home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / tcsh.1 < prev    next >
Text File  |  1995-07-25  |  163KB  |  3,499 lines

  1.  
  2.  
  3.  
  4.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           tcsh - C shell with file name completion and command line
  10.           editing
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           ttttccccsssshhhh [ ----bbbbccccddddeeeeffffiiiimmmmnnnnqqqqssssttttvvvvVVVVxxxxXXXX ] [ _a_r_g_u_m_e_n_t ... ]
  14.  
  15.           or
  16.           ttttccccsssshhhh ----llll
  17.  
  18.           OS/Dependent Options
  19.           ttttccccsssshhhh [ ----FFFF ] [ ----DDDDnnnnaaaammmmeeee[[[[====vvvvaaaalllluuuueeee]]]] ]
  20.  
  21.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.           _T_c_s_h is an enhanced version of the Berkeley UNIX C shell
  23.           _c_s_h(1).  It behaves exactly like the C shell, except for the
  24.           added utilities of:
  25.  
  26.             1)  Command line editing using Emacs-style commands.
  27.  
  28.             2)  Visual step up/down through the history list.
  29.  
  30.             3)  Terminal mode sanity checking and resetting.
  31.  
  32.             4)  Interactive command, file name and user name
  33.                 completion.
  34.  
  35.             5)  File/directory/user list in the middle of a typed
  36.                 command.
  37.  
  38.             6)  Spelling correction of command, file, and user names.
  39.  
  40.             7)  Lookup of command documentation in the middle of a
  41.                 typed command.
  42.  
  43.             8)  Enhanced history mechanism.
  44.  
  45.             9)  Automatic locking/logout after long periods of idle
  46.                 time.
  47.  
  48.             10) Automatic execution of a single command prior to
  49.                 printing each prompt.
  50.  
  51.             11) Automatic periodic command execution.
  52.  
  53.             12) A new syntax for the prompt, and the ability to set
  54.                 the prompt for "while" and "for" loops.
  55.  
  56.             13) Time stamps in the history list.
  57.  
  58.             14) An addition to the syntax of filenames to access
  59.                 entries in the directory stack, and the ability treat
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 3/9/94)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  71.  
  72.  
  73.  
  74.                 symbolic links in a sane way when changing
  75.                 directories.
  76.  
  77.             15) The ability to watch for logins and logouts by user or
  78.                 terminal on the machine.
  79.  
  80.             16) A scheduled event list, which specifies commands which
  81.                 are to be executed at given times.
  82.  
  83.             17) A new builtin that does a subset of _l_s(1).
  84.  
  85.             18) An addition to the file expression syntax for a
  86.                 character not in a set of characters and the ability
  87.                 to negate a globbing pattern.
  88.  
  89.             19) New automatically initialized environment variables
  90.                 _H_O_S_T and _H_O_S_T_T_Y_P_E.
  91.  
  92.             20) Commands for debugging terminal capabilities.
  93.  
  94.             21) Searching for the visual history mechanism.
  95.  
  96.             22) New builtins for the _w_h_i_c_h(1) and _w_h_e_r_e commands.
  97.  
  98.             23) Restarting a stopped editor with two keystrokes.
  99.  
  100.             24) Status line support
  101.  
  102.             25) Automatic execution of a command when the current
  103.                 working directory is changed.
  104.  
  105.             26) Native Language System support.
  106.  
  107.             27) Automatic process time reporting.
  108.  
  109.             28) OS Dependent Builtin Support
  110.  
  111.             29) Automatic window size adjustment
  112.  
  113.             30) Input files
  114.  
  115.             31) Additional/Undocumented Options
  116.  
  117.             32) Enhanced history/variable modifier expansion
  118.  
  119.             33) Programmable completion.
  120.  
  121.             34) Enhanced file inquiry operator.
  122.  
  123.             35) Readonly variables.
  124.  
  125.           For a description of standard C-shell features, see the _c_s_h
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 3/9/94)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  137.  
  138.  
  139.  
  140.           manual page.
  141.  
  142.      1111.... CCCCOOOOMMMMMMMMAAAANNNNDDDD LLLLIIIINNNNEEEE EEEEDDDDIIIITTTTIIIINNNNGGGG
  143.           Commands that the user types in may be edited using the same
  144.           control characters that Gnu Emacs or vi uses.  Arrow and
  145.           function key sequences are also allowed.  _T_c_s_h allows this
  146.           by setting the terminal to `CBREAK' mode and reading the
  147.           input one character at a time.
  148.  
  149.           There is a new shell command, _b_i_n_d_k_e_y, that allows the user
  150.           to redefine what any key does, or find out what any or all
  151.           of the keys do.
  152.  
  153.           Syntax: bindkey [ -a ] [ -c ] [ -s ] [ -v ] [ -e ] [ -d ] [
  154.           -k ] [ -l ] [ -r ] [ -- ] [ [ in-string | key-name ] [ out-
  155.           string | command ]]
  156.  
  157.           If no values are given all bindings are listed. If only in-
  158.           string is given, bindings for the in-string is listed.
  159.  
  160.           Otherwise it binds the in-string to the given out-string or
  161.           command.  If out-string, this is treated as input to _t_c_s_h
  162.           when in-string is typed. This may be used recursively to
  163.           currently a level of 10 deep.
  164.  
  165.           There are two basic key maps: the normal and alternative
  166.           one. The alternative is used by VI command mode. For multi-
  167.           character input the basic key maps contains a sequence-
  168.           lead-in for the first character in the input.
  169.  
  170.           Options:
  171.               -a    bind in-string in alternative key map
  172.               -s    bind an out-string instead of a command
  173.               -c    bind a unix command instead of a command
  174.               -v    bind for default VI-mode
  175.               -e    bind for default emacs-mode
  176.               -k    interpret in-string as a symbolic arrow key name
  177.               -d    bind to compiled in default
  178.               -l    list functions available with short description
  179.               -r    remove the binding of in-string
  180.  
  181.           In strings control characters may be written as caret-
  182.           <letter> and backslash ("\") is used to escape a character
  183.           as follows:
  184.                \\\\aaaa   bell character
  185.                \\\\nnnn   line feed (new line)
  186.                \\\\bbbb   back space
  187.                \\\\tttt   horizontal tab
  188.                \\\\vvvv   vertical tab
  189.                \\\\ffff   form feed
  190.                \\\\rrrr   carriage return
  191.                \\\\eeee   escape
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 3/9/94)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  203.  
  204.  
  205.  
  206.                \\\\nnnnnnnnnnnn character code in octal
  207.           In all other cases \ escapes the following character. Needed
  208.           for escaping the special meaning of \ and ^.  Delete is
  209.           written as "^?" (caret-question mark).
  210.  
  211.           _T_c_s_h always binds the arrow keys as defined by the termcap
  212.           entry to:
  213.  
  214.                 up arrow       up-history
  215.                 down arrow     down-history
  216.                 right arrow    forward-char
  217.                 left arrow     backward-char
  218.  
  219.           except where these bindings would alter other single
  220.           character bindings.  If this is not desired one can avoid
  221.           the automatic arrow key binding using _s_e_t_t_c to change the
  222.           arrow key escape sequences to the empty string.  The
  223.           ansi/vt100 sequences for arrow keys are always bound.
  224.  
  225.           The following is a list of the default emacs and vi
  226.           bindings.  Characters with the 8th bit set are written as
  227.           M-<character>.  Note however, that unlike with the old _b_i_n_d
  228.           command (see below), the syntax M-<character> has no special
  229.           meaning to the _b_i_n_d_k_e_y command, and the bindings for the
  230.           sequence escape+<character> and M-<character> as given below
  231.           are handled separately (although the the default bindings
  232.           are the same).  The printable ascii characters not mentioned
  233.           in the list are bound to the _s_e_l_f-_i_n_s_e_r_t-_c_o_m_m_a_n_d function,
  234.           which just inserts the given character literally into the
  235.           input line.  The remaining characters are bound to the
  236.           _u_n_d_e_f_i_n_e_d-_k_e_y function, which only causes a beep (unless
  237.           _n_o_b_e_e_p is set, of course).
  238.  
  239.                 EMACS bindings
  240.  
  241.                 "^@"                     ->  set-mark-command
  242.                 "^A"                     ->  beginning-of-line
  243.                 "^B"                     ->  backward-char
  244.                 "^C"                     ->  tty-sigintr
  245.                 "^D"                     ->  delete-char-or-list
  246.                 "^E"                     ->  end-of-line
  247.                 "^F"                     ->  forward-char
  248.                 "^G"                     ->  is undefined
  249.                 "^H"                     ->  backward-delete-char
  250.                 "^I"                     ->  complete-word
  251.                 "^J"                     ->  newline
  252.                 "^K"                     ->  kill-line
  253.                 "^L"                     ->  clear-screen
  254.                 "^M"                     ->  newline
  255.                 "^N"                     ->  down-history
  256.                 "^O"                     ->  tty-flush-output
  257.                 "^P"                     ->  up-history
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 3/9/94)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  269.  
  270.  
  271.  
  272.                 "^Q"                     ->  tty-start-output
  273.                 "^R"                     ->  redisplay
  274.                 "^S"                     ->  tty-stop-output
  275.                 "^T"                     ->  transpose-chars
  276.                 "^U"                     ->  kill-whole-line
  277.                 "^V"                     ->  quoted-insert
  278.                 "^W"                     ->  kill-region
  279.                 "^X"                     ->  sequence-lead-in
  280.                 "^Y"                     ->  yank
  281.                 "^Z"                     ->  tty-sigtsusp
  282.                 "^["                     ->  sequence-lead-in
  283.                 "^\"                     ->  tty-sigquit
  284.                 "^]"                     ->  tty-dsusp
  285.                 " " to "/"               ->  self-insert-command
  286.                 "0"  to "9"              ->  digit
  287.                 ":"  to "~"              ->  self-insert-command
  288.                 "^?"                     ->  backward-delete-char
  289.  
  290.                 EMACS Multi-character and 8 bit bindings
  291.  
  292.                 "^[^D" or "M-^D"         ->  list-choices
  293.                 "^[^H" or "M-^H"         ->  backward-delete-word
  294.                 "^[^I" or "M-^I"         ->  complete-word
  295.                 "^[^L" or "M-^L"         ->  clear-screen
  296.                 "^[^Z" or "M-^Z"         ->  run-fg-editor
  297.                 "^[^[" or "M-^["         ->  complete-word
  298.                 "^[^_" or "M-^_"         ->  copy-prev-word
  299.                 "^[ "  or "M- "          ->  expand-history
  300.                 "^[!"  or "M-!"          ->  expand-history
  301.                 "^[$"  or "M-$"          ->  spell-line
  302.                 "^[0"  or "M-0"          ->  digit-argument
  303.                 "^[1"  or "M-1"          ->  digit-argument
  304.                 "^[2"  or "M-2"          ->  digit-argument
  305.                 "^[3"  or "M-3"          ->  digit-argument
  306.                 "^[4"  or "M-4"          ->  digit-argument
  307.                 "^[5"  or "M-5"          ->  digit-argument
  308.                 "^[6"  or "M-6"          ->  digit-argument
  309.                 "^[7"  or "M-7"          ->  digit-argument
  310.                 "^[8"  or "M-8"          ->  digit-argument
  311.                 "^[9"  or "M-9"          ->  digit-argument
  312.                 "^[?"  or "M-?"          ->  which-command
  313.                 "^[B"  or "M-B"          ->  backward-word
  314.                 "^[C"  or "M-C"          ->  capitalize-word
  315.                 "^[D"  or "M-D"          ->  delete-word
  316.                 "^[F"  or "M-F"          ->  forward-word
  317.                 "^[H"  or "M-H"          ->  run-help
  318.                 "^[L"  or "M-L"          ->  downcase-word
  319.                 "^[N"  or "M-N"          ->  history-search-forward
  320.                 "^[P"  or "M-P"          ->  history-search-backward
  321.                 "^[R"  or "M-R"          ->  toggle-literal-history
  322.                 "^[S"  or "M-S"          ->  spell-word
  323.                 "^[U"  or "M-U"          ->  upcase-word
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 3/9/94)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  335.  
  336.  
  337.  
  338.                 "^[W"  or "M-W"          ->  copy-region-as-kill
  339.                 "^[_"  or "M-_"          ->  insert-last-word
  340.                 "^[b"  or "M-b"          ->  backward-word
  341.                 "^[c"  or "M-c"          ->  capitalize-word
  342.                 "^[d"  or "M-d"          ->  delete-word
  343.                 "^[f"  or "M-f"          ->  forward-word
  344.                 "^[h"  or "M-h"          ->  run-help
  345.                 "^[l"  or "M-l"          ->  downcase-word
  346.                 "^[n"  or "M-n"          ->  history-search-forward
  347.                 "^[p"  or "M-p"          ->  history-search-backward
  348.                 "^[r"  or "M-r"          ->  toggle-literal-history
  349.                 "^[s"  or "M-s"          ->  spell-word
  350.                 "^[u"  or "M-u"          ->  upcase-word
  351.                 "^[w"  or "M-w"          ->  copy-region-as-kill
  352.                 "^[^?" or "M-^?"         ->  backward-delete-word
  353.                 "^X^X"                   ->  exchange-point-and-mark
  354.                 "^X*"                    ->  expand-glob
  355.                 "^X$"                    ->  expand-variables
  356.                 "^XG"                    ->  list-glob
  357.                 "^Xg"                    ->  list-glob
  358.                 "^Xn                     ->  normalize-path
  359.                 "^XN                     ->  normalize-path
  360.  
  361.  
  362.                 VI Insert Mode functions
  363.  
  364.                 "^@"                     ->  is undefined
  365.                 "^A"                     ->  beginning-of-line
  366.                 "^B"                     ->  backward-char
  367.                 "^C"                     ->  tty-sigintr
  368.                 "^D"                     ->  list-or-eof
  369.                 "^E"                     ->  end-of-line
  370.                 "^F"                     ->  forward-char
  371.                 "^G"                     ->  list-glob
  372.                 "^H"                     ->  backward-delete-char
  373.                 "^I"                     ->  complete-word
  374.                 "^J"                     ->  newline
  375.                 "^K"                     ->  kill-line
  376.                 "^L"                     ->  clear-screen
  377.                 "^M"                     ->  newline
  378.                 "^N"                     ->  down-history
  379.                 "^O"                     ->  tty-flush-output
  380.                 "^P"                     ->  up-history
  381.                 "^Q"                     ->  tty-start-output
  382.                 "^R"                     ->  redisplay
  383.                 "^S"                     ->  tty-stop-output
  384.                 "^T"                     ->  transpose-chars
  385.                 "^U"                     ->  backward-kill-line
  386.                 "^V"                     ->  quoted-insert
  387.                 "^W"                     ->  backward-delete-word
  388.                 "^X"                     ->  expand-line
  389.                 "^Y"                     ->  tty-dsusp
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 3/9/94)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  401.  
  402.  
  403.  
  404.                 "^Z"                     ->  tty-sigtsusp
  405.                 "^["                     ->  vi-cmd-mode
  406.                 "^\"                     ->  tty-sigquit
  407.                 " " to "~"               ->  self-insert-command
  408.                 "^?"                     ->  backward-delete-char
  409.  
  410.                 VI Command Mode functions
  411.  
  412.                 "^@"                     ->  is undefined
  413.                 "^A"                     ->  beginning-of-line
  414.                 "^B"                     ->  is undefined
  415.                 "^C"                     ->  tty-sigintr
  416.                 "^D"                     ->  list-choices
  417.                 "^E"                     ->  end-of-line
  418.                 "^F"                     ->  is undefined
  419.                 "^G"                     ->  list-glob
  420.                 "^H"                     ->  backward-char
  421.                 "^I"                     ->  vi-cmd-mode-complete
  422.                 "^J"                     ->  newline
  423.                 "^K"                     ->  kill-line
  424.                 "^L"                     ->  clear-screen
  425.                 "^M"                     ->  newline
  426.                 "^N"                     ->  down-history
  427.                 "^O"                     ->  tty-flush-output
  428.                 "^P"                     ->  up-history
  429.                 "^Q"                     ->  tty-start-output
  430.                 "^R"                     ->  redisplay
  431.                 "^S"                     ->  tty-stop-output
  432.                 "^T"                     ->  is undefined
  433.                 "^U"                     ->  backward-kill-line
  434.                 "^V"                     ->  is undefined
  435.                 "^W"                     ->  backward-delete-word
  436.                 "^X"                     ->  expand-line
  437.                 "^["                     ->  sequence-lead-in
  438.                 "^\"                     ->  tty-sigquit
  439.                 " "                      ->  forward-char
  440.                 "!"                      ->  expand-history
  441.                 "$"                      ->  end-of-line
  442.                 "*"                      ->  expand-glob
  443.                 "+"                      ->  down-history
  444.                 ";"                      ->  vi-repeat-char-fwd
  445.                 ","                      ->  vi-repeat-char-back
  446.                 "-"                      ->  up-history
  447.                 "."                      ->  is undefined
  448.                 "/"                      ->  vi-search-back
  449.                 "0"                      ->  vi-zero
  450.                 "1" to "9"               ->  digit-argument
  451.                 "?"                      ->  vi-search-fwd
  452.                 "@"                      ->  is undefined
  453.                 "A"                      ->  vi-add-at-eol
  454.                 "B"                      ->  vi-word-back
  455.                 "C"                      ->  change-till-end-of-line
  456.  
  457.  
  458.  
  459.      Page 7                                           (printed 3/9/94)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  467.  
  468.  
  469.  
  470.                 "D"                      ->  kill-line
  471.                 "E"                      ->  vi-endword
  472.                 "F"                      ->  vi-char-back
  473.                 "I"                      ->  vi-insert-at-bol
  474.                 "J"                      ->  history-search-forward
  475.                 "K"                      ->  history-search-backward
  476.                 "N"                      ->  vi-search-back
  477.                 "O"                      ->  sequence-lead-in
  478.                 "R"                      ->  vi-replace-mode
  479.                 "S"                      ->  vi-substitute-line
  480.                 "T"                      ->  vi-charto-back
  481.                 "U"                      ->  is undefined
  482.                 "V"                      ->  expand-variables
  483.                 "W"                      ->  vi-word-fwd
  484.                 "X"                      ->  backward-delete-char
  485.                 "["                      ->  sequence-lead-in
  486.                 "\^"                     ->  beginning-of-line
  487.                 "a"                      ->  vi-add
  488.                 "b"                      ->  backward-word
  489.                 "c"                      ->  is undefined
  490.                 "d"                      ->  vi-delmeta
  491.                 "e"                      ->  vi-eword
  492.                 "f"                      ->  vi-char-fwd
  493.                 "h"                      ->  backward-char
  494.                 "i"                      ->  vi-insert
  495.                 "j"                      ->  down-history
  496.                 "k"                      ->  up-history
  497.                 "l"                      ->  forward-char
  498.                 "m"                      ->  is undefined
  499.                 "n"                      ->  vi-search-fwd
  500.                 "r"                      ->  vi-replace-char
  501.                 "s"                      ->  vi-substitute-char
  502.                 "t"                      ->  vi-charto-fwd
  503.                 "u"                      ->  vi-undo
  504.                 "v"                      ->  expand-variables
  505.                 "w"                      ->  vi-beginning-of-next-word
  506.                 "x"                      ->  delete-char
  507.                 "~"                      ->  change-case
  508.                 "^?"                     ->  backward-delete-char
  509.                 "M-?"                    ->  run-help
  510.                 "M-["                    ->  sequence-lead-in
  511.                 "M-O"                    ->  sequence-lead-in
  512.  
  513.                 VI Multi-character bindings
  514.  
  515.                 "^[?"                    ->  run-help
  516.  
  517.  
  518.           In _t_c_s_h there are two input modes: _i_n_s_e_r_t and _o_v_e_r_w_r_i_t_e. All
  519.           characters that are bound to the _s_e_l_f-_i_n_s_e_r_t-_c_o_m_m_a_n_d either
  520.           get inserted or overwrite what was under the cursor
  521.           depending on the input mode. In emacs one can toggle between
  522.  
  523.  
  524.  
  525.      Page 8                                           (printed 3/9/94)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  533.  
  534.  
  535.  
  536.           modes using the _o_v_e_r_w_r_i_t_e-_m_o_d_e function, and in VI one can
  537.           use any of the replace mode commands.  By default the mode
  538.           is preserved between input lines. To specify a default mode
  539.           that can be enforced at the beginning of each command line,
  540.           the variable _i_n_p_u_t_m_o_d_e can be set to either _i_n_s_e_r_t or
  541.           _o_v_e_r_w_r_i_t_e.
  542.  
  543.           There is also an older version of bindkey called _b_i_n_d, that
  544.           allows the user to redefine what any key does, or find out
  545.           what any or all of the keys do. This is retained for
  546.           compatibility reasons.
  547.  
  548.           If given two arguments _b_i_n_d binds the function (first
  549.           argument) to the given key (second argument).  The key may
  550.           be: the direct character or a caret-<letter> combination,
  551.           which is converted to control-<letter>; M-<letter> for an
  552.           escaped character; or F-<string> for a function key.  For
  553.           the last of these, the function key prefix must be bound to
  554.           the function "sequence-lead-in" and the string specified to
  555.           the _b_i_n_d command must not include this prefix.
  556.  
  557.           If given one argument _b_i_n_d takes the argument as the name
  558.           for a key and tells what that key does.  As a special case,
  559.           the user can say
  560.  
  561.                 bind emacs
  562.           or
  563.                 bind vi
  564.  
  565.           to bind all the keys for Emacs or vi mode respectively.
  566.  
  567.           If given no arguments _b_i_n_d tells what all of the keys do.
  568.           If you give bind the single argument of 'defaults', it
  569.           resets each key to its default value (see the above list).
  570.  
  571.      2222.... VVVVIIIISSSSUUUUAAAALLLL HHHHIIIISSSSTTTTOOOORRRRYYYY
  572.           The keys ^P and ^N are used to step up and down the history
  573.           list.  If the user has typed in the following:
  574.  
  575.                 > ls
  576.                 foo  bar
  577.                 > echo mumble
  578.                 mumble
  579.                 >
  580.  
  581.           then enters ^_P, the shell will place "echo mumble" into the
  582.           editing buffer, and will put the cursor at the end of the
  583.           line.  If another ^_P is entered, then the editing line will
  584.           change to "ls".  More ^_Ps will make the bell ring, since
  585.           there are no more lines in the history.  ^_N works the same
  586.           way, except it steps down (forward in time).
  587.  
  588.  
  589.  
  590.  
  591.      Page 9                                           (printed 3/9/94)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  599.  
  600.  
  601.  
  602.           An easy way to re-do a command is to type ^_P followed by
  603.           _R_e_t_u_r_n. Also, pieces of previous commands can be assembled
  604.           to make a new command.  The commands that work on regions
  605.           are especially useful for this.
  606.  
  607.           ^_P and ^_N actually only copy commands from out of the
  608.           history into the edit buffer; thus the user may step back
  609.           into the history and then edit things, but those changes do
  610.           not affect what is actually in _t_c_s_h '_s history.
  611.  
  612.           Another way to recall (parts of) history commands is via the
  613.           'expand-history' function. A variation of the 'expand-
  614.           history' function is called 'magic-space'.  This function
  615.           expands _c_s_h history, and always appends a space. Magic-space
  616.           thus can be bound to <space>, to automatically expand _c_s_h
  617.           history.  Expand-history is normally bound to _M-<_s_p_a_c_e> and
  618.           magic-space is not bound.
  619.  
  620.      3333.... TTTTTTTTYYYY MMMMOOOODDDDEEEE SSSSAAAANNNNIIIITTTTYYYY
  621.           As part of the editor, _t_c_s_h does a check and reset of the
  622.           terminal mode bits.  If the speed has been changed, then
  623.           _t_c_s_h will change to using that speed.  _T_c_s_h will also obey
  624.           changes in the padding needed by the tty.  Also, the shell
  625.           will automatically turn off RAW and CBREAK (on systems that
  626.           use _t_e_r_m_i_o(_7) it will turn on ICANON) modes, and will turn
  627.           on the tty driver's output processing (OPOST).
  628.  
  629.           The list of the tty modes that are always set or cleared by
  630.           _t_c_s_h can be examined and modified using the _s_e_t_t_y builtin.
  631.           The _s_e_t_t_y display is similar to _s_t_t_y(_1), and varies
  632.           depending on the system's tty driver. Modes that _t_c_s_h will
  633.           always try to set are shown as +_m_o_d_e . Modes that _t_c_s_h will
  634.           always try to clear are shown as -_m_o_d_e and modes that tcsh
  635.           will track and allow to be modified are not shown by
  636.           default, or if the -_a flag is given, are shown without a
  637.           leading sign. For tty characters, -_c_h_a_r disables the tty
  638.           character, while +_c_h_a_r protects the tty character from being
  639.           changed.
  640.  
  641.           Setty can be used to control the three different modes _t_c_s_h
  642.           uses for the tty. The default mode displayed is the
  643.           "execute" mode which is used when tcsh executes commands.
  644.           The two other modes are the "edit" mode and the "quote"
  645.           mode. The "edit" mode is used for command line editing, and
  646.           the "quote" mode is used when entering literal characters.
  647.           The "execute" mode can be specified with -_x , the "edit"
  648.           mode with -_d , and the "quote" mode with -_q For example if
  649.           one wants to set the _e_c_h_o_k flag and let the _e_c_h_o_e pass
  650.           unchanged:
  651.  
  652.                 > setty
  653.                 iflag:-inlcr -igncr +icrnl
  654.  
  655.  
  656.  
  657.      Page 10                                          (printed 3/9/94)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  665.  
  666.  
  667.  
  668.                 oflag:+opost +onlcr -onlret
  669.                 cflag:
  670.                 lflag:+isig +icanon +echo +echoe -echok -echonl -noflsh
  671.                       +echoctl -flusho +iexten
  672.                 chars:
  673.                 > setty +echok echoe
  674.                 > setty
  675.                 iflag:-inlcr -igncr +icrnl
  676.                 oflag:+opost +onlcr -onlret
  677.                 cflag:
  678.                 lflag:+isig +icanon +echo +echok -echonl -noflsh +echoctl
  679.                       -flusho +iexten
  680.                 chars:
  681.  
  682.  
  683.      4444.... WWWWOOOORRRRDDDD CCCCOOOOMMMMPPPPLLLLEEEETTTTIIIIOOOONNNN
  684.           In typing commands, it is no longer necessary to type a
  685.           complete name, only a unique abbreviation is necessary.
  686.           When you type a TAB to _t_c_s_h it will complete the name for
  687.           you, echoing the full name on the terminal (and entering it
  688.           into the edit buffer).  If the prefix you typed matches no
  689.           name, the terminal bell is rung, unless the variable _n_o_b_e_e_p
  690.           is set.  The name may be partially completed if the prefix
  691.           matches several longer names.  If this is the case, the name
  692.           is extended up to the point of ambiguity, and the bell is
  693.           rung.  This works for file names, command names, shell
  694.           variables and the ~ user name convention.  The variable
  695.           _f_i_g_n_o_r_e may be set to a list of suffixes to be disregarded
  696.           during completion.
  697.  
  698.           _E_x_a_m_p_l_e
  699.  
  700.           Assume the current directory contained the files:
  701.  
  702.                 DSC.TXT   bin       cmd       lib       memos
  703.                 DSC.NEW   chaos     cmtest    mail      netnews
  704.                 bench     class     dev       mbox      new
  705.  
  706.           The command:
  707.  
  708.                 > gnumacs ch[TAB]
  709.  
  710.           would cause _t_c_s_h to complete the command with the file name
  711.           chaos.  If instead, the user had typed:
  712.  
  713.                 > gnumacs D[TAB]
  714.  
  715.           _t_c_s_h would have extended the name to DSC and rung the
  716.           terminal bell, indicating partial completion. However, if
  717.           _f_i_g_n_o_r_e had previously been set to a list containing .NEW as
  718.           one element, e.g. ( .o .NEW ), _t_c_s_h would have completed the
  719.           `D' to DSC.TXT.
  720.  
  721.  
  722.  
  723.      Page 11                                          (printed 3/9/94)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  731.  
  732.  
  733.  
  734.           File name completion works equally well when other
  735.           directories are addressed.  Additionally, _t_c_s_h understands
  736.           the C shell tilde (~) convention for home directories.  In
  737.           addition it caches tilde name references for fast access.
  738.           This cache can be flushed by using the builtin _r_e_h_a_s_h. Thus,
  739.  
  740.                 > cd ~speech/data/fr[TAB]
  741.  
  742.           does what one might expect.  This may also be used to expand
  743.           login names only.  Thus,
  744.  
  745.                 > cd ~sy[TAB]
  746.  
  747.           expands to
  748.  
  749.                 > cd ~synthesis
  750.  
  751.  
  752.           Command names may also be completed, for example,
  753.  
  754.                 > gnum[TAB]
  755.  
  756.           will expand to "gnumacs" (assuming that there are no other
  757.           commands that begin with "gnum").
  758.  
  759.           Shell and environment variables are recognized also and in
  760.           addition they can be expanded:
  761.  
  762.                 > set local=/usr/local
  763.                 > echo $lo[TAB]
  764.  
  765.           will expand to "$local/". Note that a slash is appended
  766.           because the expanded variable points to a directory. Also:
  767.  
  768.                 > set local=/usr/local
  769.                 > echo $local/[^D]
  770.                 bin/ etc/ lib/ man/ src/
  771.  
  772.           will correctly list the contents of /usr/local. Shell and
  773.           environment variables can also be expanded via the expand-
  774.           variables function:
  775.  
  776.                 > echo $local/[^X$]
  777.                 > echo /usr/local/
  778.  
  779.  
  780.           Completion also works when the cursor is in the middle of
  781.           the line, rather than just the end.  All of the text after
  782.           the cursor will be saved, the completion will work (possibly
  783.           adding to the current name), and then the saved text will be
  784.           restored in place, after the cursor.
  785.  
  786.  
  787.  
  788.  
  789.      Page 12                                          (printed 3/9/94)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  797.  
  798.  
  799.  
  800.           The behavior of the completion can be changed by the setting
  801.           of several shell variables:
  802.  
  803.           Setting the _r_e_c_e_x_a_c_t variable makes an exact command be
  804.           expanded rather than just ringing the bell.  For example,
  805.           assume the current directory has two sub-directories called
  806.           foo and food, then with _r_e_c_e_x_a_c_t set the following could be
  807.           done:
  808.  
  809.                 > cd fo[TAB]
  810.           to ...
  811.                 > cd foo[TAB]
  812.           to ...
  813.                 > cd foo/
  814.  
  815.           rather than beeping on the second TAB.
  816.  
  817.           If the _a_u_t_o_l_i_s_t variable is set, invoking completion when
  818.           several choices are possible will automatically list the
  819.           choices, effectively merging the functionality described in
  820.           the next section into the completion mechanism. If _a_u_t_o_l_i_s_t
  821.           is set to "ambiguous", then _t_c_s_h will only list the choices
  822.           if there were no new characters added in the completion
  823.           operation.
  824.  
  825.  
  826.           The "noise level" can be controlled by the value that
  827.           _m_a_t_c_h_b_e_e_p is set to: With matchbeep=nomatch, completion will
  828.           only beep if there are no matching names; with
  829.           matchbeep=ambiguous, completion will _a_l_s_o beep if there are
  830.           many possible matches; with matchbeep=notunique, completion
  831.           will _a_l_s_o beep when there is an exact match but there are
  832.           other, longer, matches (see recexact).  With matchbeep=never
  833.           or set to any other value completion will never beep. If
  834.           matchbeep is not set it defaults to ambiguous.
  835.  
  836.           If the _a_u_t_o_e_x_p_a_n_d variable is set, the expand-history
  837.           function will be invoked automatically before the completion
  838.           attempt, expanding normal _c_s_h history substitutions.
  839.  
  840.           For covert operation, the variable _n_o_b_e_e_p can be set; it
  841.           will prevent the completion mechanism, as well as _t_c_s_h in
  842.           general, from actually beeping.  Finally, if the _a_u_t_o_c_o_r_r_e_c_t
  843.           variable is set, the spelling correction is attempted for
  844.           any path components up to the completion point.
  845.  
  846.      5555.... LLLLIIIISSSSTTTTIIIINNNNGGGG OOOOFFFF PPPPOOOOSSSSSSSSIIIIBBBBLLLLEEEE NNNNAAAAMMMMEEEESSSS
  847.           At any point in typing a command, you may request "what
  848.           names are available".  Thus, when you have typed, perhaps:
  849.  
  850.                 > cd ~speech/data/fritz/
  851.  
  852.  
  853.  
  854.  
  855.      Page 13                                          (printed 3/9/94)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  863.  
  864.  
  865.  
  866.           you may wish to know what files or sub-directories exist (in
  867.           ~speech/data/fritz), without, of course, aborting the
  868.           command you are typing.  Typing the character Control-D
  869.           (^D), will list the names (files, in this case) available.
  870.           The files are listed in multicolumn format, sorted column-
  871.           wise.  Directories are indicated with a trailing `/',
  872.           executable files with a `*', symbolic links with a '@',
  873.           sockets with a '=', FIFOs (named pipes) with a '|',
  874.           character devices with a '%', and block devices with a '#'.
  875.           Once printed, the command is re-echoed for you to complete.
  876.  
  877.           Additionally, one may want to know which files match a
  878.           prefix.  If the user had typed:
  879.  
  880.                 > cd ~speech/data/fr[^D]
  881.  
  882.           all files and sub-directories whose prefix was ``fr'' would
  883.           be printed.  Notice that the example before was simply a
  884.           degenerate case of this with a null trailing file name. (The
  885.           null string is a prefix of all strings.) Notice also, that a
  886.           trailing slash is required to pass to a new directory for
  887.           both file name completion and listing.
  888.  
  889.           The degenerate
  890.  
  891.                 > ~[^D]
  892.  
  893.           will print a full list of login names on the current system.
  894.           Note, however, that the degenerate
  895.  
  896.                 > <Spaces>[^D]
  897.  
  898.           does not list all of the commands, but only the files in the
  899.           current working directory.
  900.  
  901.           Listing/expanding of words that match a name containing
  902.           wildcard characters can be done via the list-glob/expand-
  903.           glob function:
  904.                 > ls
  905.                 foo.c  bar.c  a.out
  906.                 > vi *.c[^Xg]
  907.                 foo.c bar.c
  908.                 > vi *.c[^X*]
  909.                 > vi foo.c bar.c
  910.  
  911.      CCCCoooommmmmmmmaaaannnndddd NNNNaaaammmmeeee RRRReeeeccccooooggggnnnniiiittttiiiioooonnnn
  912.           Command name recognition and completion works in the same
  913.           manner as file name recognition and completion above.  The
  914.           current value of the environment variable _P_A_T_H is used in
  915.           searching for the command.  For example
  916.  
  917.                 > newa[TAB]
  918.  
  919.  
  920.  
  921.      Page 14                                          (printed 3/9/94)
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  929.  
  930.  
  931.  
  932.           might expand to
  933.  
  934.                 > newaliases
  935.  
  936.           Also,
  937.  
  938.                 > new[^D]
  939.  
  940.           would list all commands (along PATH) that begin with "new".
  941.  
  942.           Note that Control-D has three different effects on _t_c_s_h. On
  943.           an empty line (one that contains nothing, not even spaces),
  944.           ^_D sends an EOF to _t_c_s_h just as it does for normal programs.
  945.           When the cursor is in the middle of a line of text, ^_D
  946.           deletes the character that the cursor is under.  Finally, a
  947.           ^_D at the end of a line of text lists the available names at
  948.           that point.  To get a list of available names when the
  949.           cursor is in the middle of a line (or on an empty line), a
  950.           Meta-Control-D should be typed (Escape followed by Control-
  951.           D).
  952.  
  953.      6666.... SSSSPPPPEEEELLLLLLLLIIIINNNNGGGG CCCCOOOORRRRRRRREEEECCCCTTTTIIIIOOOONNNN
  954.           If while typing a command, the user mistypes or misspells a
  955.           file name, user name, or command name, _t_c_s_h can correct the
  956.           spelling.  When correcting a file name, each part of the
  957.           path is individually checked and corrected.  Spelling
  958.           correction can be invoked in several different ways:
  959.  
  960.           The _s_p_e_l_l-_w_o_r_d function, normally bound to M-s (and M-S),
  961.           will attempt to correct the word immediately before the
  962.           cursor.  For example, suppose that the user has typed:
  963.  
  964.                 > cd /uxr/spol/news[ESC s]
  965.  
  966.           _T_c_s_h will check the path for spelling, correct the mistakes,
  967.           and redraw the line as
  968.  
  969.                 > cd /usr/spool/news
  970.  
  971.           leaving the cursor at the end of the line.
  972.  
  973.           Spelling correction of the entire command line (independent
  974.           of where the cursor is) can be done with the _s_p_e_l_l-_l_i_n_e
  975.           function, normally bound to M-$ (Escape Dollar-sign).  It
  976.           will check each word independently, but in order to avoid
  977.           e.g. command options, no correction is attempted on words
  978.           whose first character is found in the string "!.\^-*%".
  979.  
  980.           Finally, automatic spelling correction will be done each
  981.           time the Return key is hit, if the _c_o_r_r_e_c_t variable is set
  982.           to an appropriate value: correct=cmd will cause the spelling
  983.           of the command name only to be checked, while correct=all
  984.  
  985.  
  986.  
  987.      Page 15                                          (printed 3/9/94)
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  995.  
  996.  
  997.  
  998.           causes checking of all words on the line, like the spell-
  999.           line function.  If any part of the command line is
  1000.           corrected, the user will be given a special prompt as
  1001.           defined by the _p_r_o_m_p_t_3 variable, followed by the corrected
  1002.           line, e.g.
  1003.  
  1004.                 > lz /usr/bin
  1005.                 CORRECT>ls /usr/bin (y|n|e)?
  1006.  
  1007.           Answering 'y' or <space> at the prompt will cause the
  1008.           corrected line to be executed, 'e' will leave the
  1009.           uncorrected command in the input buffer and anything else
  1010.           will execute the original line unchanged.
  1011.  
  1012.           Automatic correction is not guaranteed to work the way the
  1013.           user intended.  Command line parsing is done in a
  1014.           rudimentary fashion. It is mostly provided as an
  1015.           experimental feature. Suggestions and improvements are
  1016.           welcome.
  1017.  
  1018.      7777.... DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN LLLLOOOOOOOOKKKKUUUUPPPP
  1019.           The editor function _r_u_n-_h_e_l_p (M-h) prints a help file on the
  1020.           current command (using the same definition of current as the
  1021.           completion routines use).  This help file is found by
  1022.           searching the path list HPATH for files of the form
  1023.           foo.help, foo.1, foo.8, or foo.6 in that order (assuming
  1024.           that the current command is foo).  The file is just printed,
  1025.           not paged in any way.  This is because _r_u_n-_h_e_l_p is meant to
  1026.           be used to look up short help files, not manual pages
  1027.           (although it can do manual pages also).
  1028.  
  1029.      8888.... EEEENNNNHHHHAAAANNNNCCCCEEEEDDDD HHHHIIIISSSSTTTTOOOORRRRYYYY MMMMEEEECCCCHHHHAAAANNNNIIIISSSSMMMM
  1030.           _T_c_s_h will save the history list between login sessions.  It
  1031.           does this by writing the current list to the file
  1032.           "~/.history" on logout, and reading it in on login.  For
  1033.           example, placing the line
  1034.  
  1035.                 > set history=25 savehist=20
  1036.  
  1037.           tells _t_c_s_h to save the last 25 commands on the history list,
  1038.           and to save the last 20 of them between logins.  The
  1039.           "savehist" variable may be set up to the size of history,
  1040.           although it is an error to have _s_a_v_e_h_i_s_t larger than
  1041.           _h_i_s_t_o_r_y. In addition to the above _t_c_s_h, keeps unparsed
  1042.           (literal) versions of the history if the variable _h_i_s_t_l_i_t is
  1043.           set. Also the toggle-history function toggles between the
  1044.           parsed and literal version of the recalled history in the
  1045.           editor buffer. For example:
  1046.  
  1047.                 > set histlit
  1048.                 > echo !:s/foo/bar; ls
  1049.                 Modifier failed.
  1050.  
  1051.  
  1052.  
  1053.      Page 16                                          (printed 3/9/94)
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1061.  
  1062.  
  1063.  
  1064.                 > ^P
  1065.                 > echo !:s/foo/bar; ls
  1066.                 > unset histlit
  1067.                 > echo !:s/foo/bar; ls
  1068.                 Modifier failed.
  1069.                 > ^P
  1070.                 > echo unset histlit[M-r]
  1071.                 > echo !:s/foo/bar; ls
  1072.  
  1073.           _T_c_s_h also supports the history escape !#. This undocumented
  1074.           _c_s_h escape holds the words of the current line. This is
  1075.           useful in renaming commands:
  1076.  
  1077.                 > mv foo bar!#:1
  1078.                 mv foo barfoo
  1079.  
  1080.           Care should be taken when using this history expansion in
  1081.           _c_s_h since there is no check for recursion. In _t_c_s_h up to 10
  1082.           levels of recursion are allowed.
  1083.  
  1084.           Another difference between _t_c_s_h and _c_s_h history expansion,
  1085.           is the treatment of history arguments. In _c_s_h !_3_d expands to
  1086.           event 3 with the letter "d" appended to it. There is no way
  1087.           to repeat a command that begins with a number using the name
  1088.           of the command in the history escape. In _t_c_s_h only numeric
  1089.           arguments are treated as event numbers; therefore !_3_d is
  1090.           interpreted as: repeat the last command that started with
  1091.           the string "3d". To mimic the _c_s_h behavior !_3_\_d can be used.
  1092.  
  1093.  
  1094.      9999.... AAAAUUUUTTTTOOOOMMMMAAAATTTTIIIICCCC LLLLOOOOGGGGOOOOUUUUTTTT////LLLLOOOOCCCCKKKKIIIINNNNGGGG
  1095.           The automatic locking and logout time are controlled by the
  1096.           variable _a_u_t_o_l_o_g_o_u_t. The value of the first word is the
  1097.           number of minutes of inactivity will be allowed before
  1098.           automatically logging the user out.  When that many minutes
  1099.           have been reached, the shell prints "auto-logout" and dies
  1100.           (without executing ~/.logout).  The default for _t_c_s_h is to
  1101.           set _a_u_t_o_l_o_g_o_u_t for 60 minutes on login shells, and when the
  1102.           user is root.  To disable autologout (for instance in a
  1103.           window system), unset the shell variable _a_u_t_o_l_o_g_o_u_t.
  1104.  
  1105.           The value of the optional second word indicates the number
  1106.           of minutes of inactivity after which the user will be
  1107.           prompted for his login password to continue working. Failure
  1108.           to enter the correct password 5 times, results in auto-
  1109.           logout.
  1110.  
  1111.      11110000.... EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN OOOOFFFF AAAA CCCCOOOOMMMMMMMMAAAANNNNDDDD PPPPRRRRIIIIOOOORRRR TTTTOOOO EEEEAAAACCCCHHHH PPPPRRRROOOOMMMMPPPPTTTT
  1112.           _T_c_s_h supports a special alias, _p_r_e_c_m_d, which if set holds a
  1113.           command that will be executed before printing each prompt.
  1114.           For example, if the user has done
  1115.  
  1116.  
  1117.  
  1118.  
  1119.      Page 17                                          (printed 3/9/94)
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1127.  
  1128.  
  1129.  
  1130.                 > alias precmd date
  1131.  
  1132.           then the program _d_a_t_e will be run just before the shell
  1133.           prompts for each command.  There are no limitations on what
  1134.           precmd can be set to do, although discretion should be used.
  1135.  
  1136.      11111111.... PPPPEEEERRRRIIIIOOOODDDDIIIICCCC CCCCOOOOMMMMMMMMAAAANNNNDDDD EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN
  1137.           _T_c_s_h is now capable of providing periodic command execution
  1138.           through the use of the shell variable _t_p_e_r_i_o_d and the alias
  1139.           _p_e_r_i_o_d_i_c. When these items are set, the alias _p_e_r_i_o_d_i_c will
  1140.           be executed every _t_p_e_r_i_o_d minutes.  This provides a
  1141.           convenient means for checking on common but infrequent
  1142.           changes, such as new messages.  Example:
  1143.  
  1144.                 > set tperiod = 30
  1145.                 > alias periodic checknews
  1146.  
  1147.           This will cause the _c_h_e_c_k_n_e_w_s(1) program to be run every 30
  1148.           minutes.  Having the alias _p_e_r_i_o_d_i_c set but with an unset
  1149.           _t_p_e_r_i_o_d (or a value of 0 for _t_p_e_r_i_o_d) will cause _p_e_r_i_o_d_i_c to
  1150.           degenerate to another form of _p_r_e_c_m_d.
  1151.  
  1152.      11112222.... NNNNEEEEWWWW PPPPRRRROOOOMMMMPPPPTTTT FFFFOOOORRRRMMMMAAAATTTT
  1153.           The format for the _p_r_o_m_p_t shell variable has been changed to
  1154.           include many new things, such as the current time of day,
  1155.           current working directory, etc..  The new format uses
  1156.           "%<char>" to signal an expansion, much like _p_r_i_n_t_f(_3_S). The
  1157.           available sequences are:
  1158.  
  1159.                 %/          Current working directory.
  1160.                 %~          cwd.  If it starts with $HOME, that part is
  1161.                             replaced by a ~. In addition if a directory
  1162.                             name prefix matches a user's home directory,
  1163.                             that part of the directory will be substituted
  1164.                             with ~user. NOTE: The ~user substitution will
  1165.                             only happen if the shell has performed a ~
  1166.                             expansion for that user name in this session.
  1167.                 %c or %.    Trailing component of cwd, may be
  1168.                             followed by by a digit to get more than one
  1169.                             component, if it starts with $HOME, that
  1170.                             part is replaced with a ~.
  1171.                 %C          Trailing component of cwd, may be followed
  1172.                             by a digit to get more than one component, no
  1173.                             ~ substitution.
  1174.                 %h, %!, !   Current history event number.
  1175.                 %M          The full machine hostname.
  1176.                 %m          The hostname up to the first ".".
  1177.                 %S (%s)     Start (stop) standout mode.
  1178.                 %B (%b)     Start (stop) boldfacing mode. (Only if
  1179.                             tcsh was compiled to be eight bit clean.)
  1180.                 %U (%u)     Start (stop) underline mode. (Only if
  1181.                             tcsh was compiled to be eight bit clean.)
  1182.  
  1183.  
  1184.  
  1185.      Page 18                                          (printed 3/9/94)
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1193.  
  1194.  
  1195.  
  1196.                 %t or %@    Current time of day, in 12-hour, am/pm format.
  1197.                 %T          Current time of day, in 24-hour format.
  1198.                             (But see the _a_m_p_m shell variable below.)
  1199.                 %p          Current time in 12-hour format, am/pm format with seconds.
  1200.                 %P          Current time in 24-hour format, with seconds.
  1201.                 \c          `c' is parsed the same way as in bindkey.
  1202.                 ^c          `c' is parsed the same way as in bindkey.
  1203.                 %%          A single %.
  1204.                 %n          The user name, contents of $user.
  1205.                 %d          The weekday in <Day> format.
  1206.                 %D          The day in dd format.
  1207.                 %w          The month in <Mon> format.
  1208.                 %W          The month in mm format.
  1209.                 %y          The year in yy format.
  1210.                 %Y          The year in yyyy format.
  1211.                 %l          The line (tty) the user is logged on.
  1212.                 %L          clear from prompt to end of display or end of line.
  1213.                 %#          A `#' if tcsh is run as a root shell,
  1214.                             a `>' if not.
  1215.                 %{..%}      Include string as a literal escape sequence.
  1216.                             Note that the enclosed escape sequence, should
  1217.                             only be used to change terminal attributes and
  1218.                             should not move the cursor location. Also, this
  1219.                             cannot be the last character in the prompt
  1220.                             string. (Available only if tcsh was compiled to
  1221.                             be eight bit clean.)
  1222.                 %?          return code of the last command executed just
  1223.                             before the prompt.
  1224.                 %R          In prompt3 this is the corrected string; in
  1225.                             prompt2 it is the status of the parser.
  1226.  
  1227.           On %C, %c and %., if the optional digit is 0, then then next
  1228.           digit is interpreted as the number of directory components
  1229.           to be skipped, and the number of components skipped are
  1230.           reported as: /<num-skipped>path/path.
  1231.  
  1232.           The sequences for standout are often used to indicate that
  1233.           this is an enabled (running as root) shell.  An example:
  1234.  
  1235.                 > set prompt="%m [%h] %U[%@]%u [%/] you rang? "
  1236.                 tut [37] [_2:_5_4_p_m] [/usr/accts/sys] you rang? _
  1237.  
  1238.           In addition, there is a new variable, _p_r_o_m_p_t_2, which is used
  1239.           to prompt for the body of while and for loops (wherever
  1240.           normal _c_s_h prompts with a question mark).  The default for
  1241.           _p_r_o_m_p_t_2 is "%R? ": the status of the parser followed by a
  1242.           question mark.  This alternate prompt is also used when the
  1243.           parser is waiting for more input; i.e. when the previous
  1244.           line ended in a \.  The _p_r_o_m_p_t_3 variable is used when
  1245.           displaying the corrected command line when automatic
  1246.           spelling correction is in effect; it defaults to "CORRECT>%R
  1247.           (y|n|e)? ".
  1248.  
  1249.  
  1250.  
  1251.      Page 19                                          (printed 3/9/94)
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1259.  
  1260.  
  1261.  
  1262.      11113333.... TTTTIIIIMMMMEEEE----SSSSTTTTAAAAMMMMPPPPEEEEDDDD HHHHIIIISSSSTTTTOOOORRRRYYYY LLLLIIIISSSSTTTT
  1263.           The history list in _t_c_s_h now has a time-of-day stamp
  1264.           attached to each history list event.  This time stamp is
  1265.           printed whenever the history command is executed.  This
  1266.           allows the user to keep track of when the various events
  1267.           occurred.  The time stamps are not maintained on the saved
  1268.           history list (also available in _c_s_h); thus, on logging back
  1269.           in, all the saved history events will be recorded with the
  1270.           login time as their time stamp.  The time stamp printouts
  1271.           can be omitted from the history list by adding the -t switch
  1272.           to the _h_i_s_t_o_r_y command.  _T_c_s_h provides a way to save,
  1273.           restore and clear the history list in a file.
  1274.  
  1275.           _h_i_s_t_o_r_y -_S [<_f_i_l_e_n_a_m_e>]
  1276.           _h_i_s_t_o_r_y -_L [<_f_i_l_e_n_a_m_e>]
  1277.           _h_i_s_t_o_r_y -_c
  1278.  
  1279.           The 'S' flag saves the current history, the 'L' flags loads
  1280.           the history, and the 'c' flag clears the history.  If a
  1281.           filename is not specified, then $HOME/.history is used.
  1282.  
  1283.      11114444.... DDDDIIIIRRRREEEECCCCTTTTOOOORRRRYYYY AAAACCCCCCCCEEEESSSSSSSS
  1284.           _T_c_s_h supports three new flags to control directory style
  1285.           printing for cd, pushd, popd, and dirs:
  1286.  
  1287.           -_n  Print entries in new lines so that the screen width is
  1288.               not exceeded
  1289.  
  1290.           -_l  Don't print ~ but print the whole path
  1291.  
  1292.           -_v  Print the stack entries one in each line, preceded by
  1293.               the stack number.
  1294.  
  1295.           Note that popd +n can be used to pop out stack entries of
  1296.           directories that do not exist any more.
  1297.  
  1298.           _T_c_s_h always saves the last directory visited. Changing to
  1299.           the previous directory can be done by using '_c_d -' or '_p_u_s_h_d
  1300.           -'.
  1301.  
  1302.           _T_c_s_h will now allow the user to access all elements in the
  1303.           directory stack directly.  The syntax "=<digit>" is
  1304.           recognized by _t_c_s_h as indicating a particular directory in
  1305.           the stack.  (This works for the file/command name
  1306.           recognition as well.) This syntax is analogous to the ~
  1307.           syntax for access to users' home directories.  The stack is
  1308.           viewed as zero-based, i.e., =0 is the same as $cwd, which is
  1309.           the same as ".".  As a special case, the string "=-" is
  1310.           recognized as indicating the last directory in the stack.
  1311.           Thus,
  1312.  
  1313.                 > dirs -v
  1314.  
  1315.  
  1316.  
  1317.      Page 20                                          (printed 3/9/94)
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1325.  
  1326.  
  1327.  
  1328.                 0 /usr/net/bin
  1329.                 1 /usr/spool/uucp
  1330.                 2 /usr/accts/sys
  1331.                 > echo =2
  1332.                 /usr/accts/sys
  1333.                 > ls -l =1/LOGFILE
  1334.                 -rw-r--r-- 1 uucp   2594 Jan 19 09:09 /usr/spool/uucp/LOGFILE
  1335.                 > echo =-/.cs*
  1336.                 /usr/accts/sys/.cshrc
  1337.                 > echo =4
  1338.                 Not that many dir stack entries.
  1339.                 >
  1340.  
  1341.           _T_c_s_h will complain if you ask for a directory stack item
  1342.           which does not exist.
  1343.  
  1344.           In the normal _c_s_h, saying "pushd +2" would rotate the entire
  1345.           stack around through 2 stack elements, placing the entry
  1346.           found there at the top of the stack.  If, however, the new
  1347.           shell variable _d_e_x_t_r_a_c_t is set, then issuing "pushd +n" will
  1348.           cause the nth directory stack element to be extracted from
  1349.           its current position, which will then be pushed onto the top
  1350.           of the stack.  Example:
  1351.  
  1352.                 > dirs
  1353.                 ~ /usr/spool/uucp /usr/net/bin /sys/src
  1354.                 > set dextract
  1355.                 > pushd +2
  1356.                 /usr/net/bin ~ /usr/spool/uucp /sys/src
  1357.                 > unset dextract
  1358.                 > pushd +2
  1359.                 /usr/spool/uucp /sys/src /usr/net/bin ~
  1360.  
  1361.           _T_c_s_h provides a way to save, restore and clear the directory
  1362.           stack in a file.
  1363.  
  1364.           _d_i_r_s -_S [<_f_i_l_e_n_a_m_e>]
  1365.           _d_i_r_s -_L [<_f_i_l_e_n_a_m_e>]
  1366.           _d_i_r_s -_c
  1367.  
  1368.           The 'S' flag saves the current directory stack, the 'L'
  1369.           flags loads the directory stack, and the 'c' flag clears the
  1370.           directory stack.  If a filename is not specified, then
  1371.           $HOME/.cshdirs is used.
  1372.  
  1373.           In addition, if the shell variable _d_u_n_i_q_u_e is set, only
  1374.           directories that are not already in the directory stack will
  1375.           be added when _p_u_s_h is invoked.
  1376.  
  1377.           The way symbolic links that point to directories are crossed
  1378.           is determined by the _s_y_m_l_i_n_k_s variable. By default, it is
  1379.           not set to anything and symbolic links are not treated
  1380.  
  1381.  
  1382.  
  1383.      Page 21                                          (printed 3/9/94)
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1391.  
  1392.  
  1393.  
  1394.           specially. However, it can be set to either: _c_h_a_s_e, _i_g_n_o_r_e,
  1395.           or _e_x_p_a_n_d. If _s_y_m_l_i_n_k_s is set to _c_h_a_s_e, then every time the
  1396.           directory changes, $_c_w_d reflects the real directory name,
  1397.           and not the name through the link. A notable exception is
  1398.           the user's home directory, but that should be fixed. If
  1399.           _s_y_m_l_i_n_k_s is set to either _i_g_n_o_r_e or _e_x_p_a_n_d, then tcsh tries
  1400.           to determine the current directory name relative to the name
  1401.           of the current directory before the link was crossed. In
  1402.           simple terms, if you chdir through a symbolic link and then
  1403.           cd .., you will end .. relatively to where you were before
  1404.           you crossed the link and not .. relatively to where the
  1405.           symbolic link points. While _i_g_n_o_r_e affects only builtin
  1406.           commands and completion, _e_x_p_a_n_d affects command execution
  1407.           too, by `fixing' arguments that it considers to be path
  1408.           names. Unfortunately this does not work in every case,
  1409.           specially when file arguments are embedded in command line
  1410.           options. _E_x_p_a_n_d also allows to specify the `real' (as
  1411.           opposed to the one determined relatively to $_c_w_d), _b_y
  1412.           _q_u_o_t_i_n_g _t_h_e _f_i_l_e _a_r_g_u_m_e_n_t.
  1413.  
  1414.           For example:
  1415.  
  1416.                 > cd /tmp
  1417.                 > mkdir from from/src to
  1418.                 > ln -s ../from/src to/dst
  1419.  
  1420.                 > unset symlinks
  1421.                 > cd /tmp/to/dst; echo $cwd
  1422.                 /tmp/to/dst
  1423.                 > cd ..; echo $cwd
  1424.                 /tmp/from
  1425.  
  1426.                 > set symlinks=chase
  1427.                 > cd /tmp/to/dst; echo $cwd
  1428.                 /tmp/from/src
  1429.                 > cd ..; echo $cwd
  1430.                 /tmp/from
  1431.  
  1432.                 > set symlinks=ignore
  1433.                 > cd /tmp/to/dst; echo $cwd
  1434.                 /tmp/to/dst
  1435.                 > cd ..; echo $cwd
  1436.                 /tmp/to
  1437.  
  1438.                 > set symlinks=expand
  1439.                 > cd /tmp/to/dst; echo $cwd
  1440.                 /tmp/to/dst
  1441.                 > cd ..; echo $cwd       # builtin
  1442.                 /tmp/to
  1443.                 > cd /tmp/to/dst; echo $cwd
  1444.                 /tmp/to/dst
  1445.                 > cd ".."; echo $cwd          # quoted
  1446.  
  1447.  
  1448.  
  1449.      Page 22                                          (printed 3/9/94)
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1457.  
  1458.  
  1459.  
  1460.                 /tmp/from
  1461.                 > /bin/echo ..           # rewrites non builtin commands.
  1462.                 /tmp/to
  1463.                 > /bin/echo ".."
  1464.  
  1465.           While the _e_x_p_a_n_d setting is the most convenient, and makes
  1466.           symbolic links invisible, it can sometimes be misleading and
  1467.           confusing in cases where it fails to recognize arguments. A
  1468.           compromise is to use the _i_g_n_o_r_e setting and use the editor
  1469.           functions "normalize-path", bound by default to ^_X_n.
  1470.  
  1471.      11115555.... WWWWAAAATTTTCCCCHHHHIIIINNNNGGGG FFFFOOOORRRR LLLLOOOOGGGGIIIINNNNSSSS AAAANNNNDDDD LLLLOOOOGGGGOOOOUUUUTTTTSSSS
  1472.           _T_c_s_h has a mechanism so that the user can watch for login
  1473.           and logout activity of any user or terminal in the system.
  1474.           This is accomplished using the new special shell variable
  1475.           _w_a_t_c_h, which contains login/terminal pattern pairs to be
  1476.           checked for activity.  For example:
  1477.  
  1478.                 > set watch=(sys ttyjd root console)
  1479.  
  1480.           This setting will allow the user to check on when the user
  1481.           "sys" logs in on /dev/ttyjd.  Similarly, it will inform the
  1482.           user of root's activity on the console.  In order to be more
  1483.           general, the word "any" may be substituted for either a
  1484.           user's or a terminal's name, thus allowing
  1485.  
  1486.                 > set watch=('b*' any any ttyh0)
  1487.  
  1488.           which will check for users that match the pattern 'b*'
  1489.           logging in or out of the system on any terminal, as well as
  1490.           anyone logging in to /dev/ttyh0. Naturally, the completely
  1491.           general case
  1492.  
  1493.                 > set watch=(any any)
  1494.  
  1495.           allows the user to check on any and all login/logout
  1496.           activity in the the system.
  1497.  
  1498.           By default, the interval between checks of users on the
  1499.           system is 10 minutes; this can be changed by making the
  1500.           first element of _w_a_t_c_h a number of minutes which should be
  1501.           used instead, as in
  1502.  
  1503.                 > set watch=(40 any any)
  1504.  
  1505.           which will check for any users logging in or out every 40
  1506.           minutes.
  1507.  
  1508.           There is also a new command, _l_o_g, which is used to cause
  1509.           _t_c_s_h to inform the user of all users/terminals affected by
  1510.           _w_a_t_c_h whether they have been announced before or not.  This
  1511.           is useful if a user has been on for some time and cannot
  1512.  
  1513.  
  1514.  
  1515.      Page 23                                          (printed 3/9/94)
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1523.  
  1524.  
  1525.  
  1526.           remember if a particular person/terminal is online right now
  1527.           or not.  _L_o_g will reset all indication of previous
  1528.           announcement and give the user the login list all over
  1529.           again, as well as printing the current value of _w_a_t_c_h.
  1530.  
  1531.           The first time that _w_a_t_c_h is set at _t_c_s_h startup, all
  1532.           affected users and terminals will be printed as though those
  1533.           users/terminals had just logged on.  This may appear to be a
  1534.           bug, but is generally considered a feature, since it allows
  1535.           the user to see who is on when he first logs in.
  1536.  
  1537.           The format of the printouts can be tailored via setting of
  1538.           the variable _w_h_o. In addition to the standard prompt %
  1539.           escapes, the following sequences are available for the
  1540.           format specification:
  1541.  
  1542.                 %n          The name of the user that logged in/out.
  1543.                 %a          The observed action, i.e. "logged on",
  1544.                             "logged off", or "replaced <olduser> on".
  1545.                 %l          The line (tty) the user is logged on.
  1546.                 %M          The full hostname of the remote host ("local"
  1547.                             if non-remote).
  1548.                 %m          The hostname up to the first ".". If only
  1549.                             the ip address is available or the utmp
  1550.                             field contains the name of an x-windows
  1551.                             display, the whole name is printed.
  1552.  
  1553.           The %M and %m sequences are only available on systems that
  1554.           store the remote hostname in /etc/utmp. If _w_h_o is not set,
  1555.           the format defaults to "%n has %a %l from %m.", or "%n has
  1556.           %a %l." on systems that don't store the hostname.
  1557.  
  1558.      11116666.... TTTTIIIIMMMMEEEEDDDD EEEEVVVVEEEENNNNTTTT LLLLIIIISSSSTTTT
  1559.           _T_c_s_h now supports a scheduled-event list through the use of
  1560.           the command _s_c_h_e_d. This command gives the user a mechanism
  1561.           by which to arrange for other commands to be executed at
  1562.           given times.  An event is added to the scheduled-event list
  1563.           by saying
  1564.  
  1565.                 > sched [+]hh:mm <command>
  1566.  
  1567.           as in
  1568.  
  1569.                 > sched 11:00 echo It\'s eleven o\'clock.
  1570.  
  1571.           This will make an entry in the list at 11am for the echo
  1572.           command to be run with the given arguments.  The time may be
  1573.           specified in either absolute or relative time, and absolute
  1574.           times may have a morning/afternoon specification as well,
  1575.           using "am" or "pm." For example,
  1576.  
  1577.                 > sched +2:15 /usr/lib/uucp/uucico -r1 -sother
  1578.  
  1579.  
  1580.  
  1581.      Page 24                                          (printed 3/9/94)
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1589.  
  1590.  
  1591.  
  1592.                 > sched 5pm set prompt='[%h] It\'s after 5; go home: >'
  1593.                 > sched +3am echo This syntax doesn\'t work.
  1594.                 Relative time inconsistent with am/pm.
  1595.                 >
  1596.  
  1597.           Note that _t_c_s_h will complain if you try to make faulty time
  1598.           specifications.
  1599.  
  1600.           Printing the current time-event list is accomplished by
  1601.           giving the _s_c_h_e_d command with no arguments:
  1602.  
  1603.                 > sched
  1604.                      1  Wed Apr  4 15:42  /usr/lib/uucp/uucico -r1 -sother
  1605.                      2  Wed Apr  4 17:00  set prompt=[%h] It's after 5; go home: >
  1606.                 >
  1607.  
  1608.           There is also a mechanism by which the user can remove an
  1609.           item from the list:
  1610.  
  1611.                 > sched --3
  1612.                 Usage for delete: sched -<item#>.
  1613.                 > sched -3
  1614.                 Not that many scheduled events.
  1615.                 > sched -2
  1616.                 > sched
  1617.                      1  Wed Apr  4 15:42  /usr/lib/uucp/uucico -r1 -sother
  1618.                 >
  1619.  
  1620.           All commands specified on the scheduled-event list will be
  1621.           executed just prior to printing the first prompt immediately
  1622.           following the time when the command is to be run.  Hence, it
  1623.           is possible to miss the exact time when the command is to be
  1624.           run, but _t_c_s_h will definitely get around to all commands
  1625.           which are overdue at its next prompt.  Scheduled-event list
  1626.           items which come due while _t_c_s_h is waiting for user input
  1627.           will be executed immediately.  In no case, however, will
  1628.           normal operation of already-running commands be interrupted
  1629.           so that a scheduled-event list element may be run.
  1630.  
  1631.           This mechanism is similar to, but not the same as, the _a_t(1)
  1632.           command on some Unix systems.  Its major disadvantage is
  1633.           that it does not necessarily run a command at exactly the
  1634.           specified time (but only if another command is already being
  1635.           run).  Its major advantage is that commands which run
  1636.           directly from _t_c_s_h, as sched commands are, have access to
  1637.           shell variables and other structures.  This provides a
  1638.           mechanism for changing one's working environment based on
  1639.           the time of day.
  1640.  
  1641.      11117777.... BBBBUUUUIIIILLLLTTTTIIIINNNN FFFFOOOORRRR llllssss ----FFFF
  1642.           There is a new builtin command called _l_s-_F which does the
  1643.           same thing as the command "ls -F".  If the shell variable
  1644.  
  1645.  
  1646.  
  1647.      Page 25                                          (printed 3/9/94)
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1655.  
  1656.  
  1657.  
  1658.           _s_h_o_w_d_o_t_s has been set, it acts like "ls -aF". If _s_h_o_w_d_o_t_s is
  1659.           equal to "-A", then _l_s-_F acts like "ls -AF". Ls-F works like
  1660.           ls, only it is generally faster, since it does not need to
  1661.           fork and exec, and safer against Trojan horses if the user
  1662.           has `.' in the execution path. If other switches are passed
  1663.           to _l_s-_F, then the normal ls is executed. Aliasing ls to ls-F
  1664.           provides a fast alternative way of listing files.  Note that
  1665.           on non BSD machines, where ls -C is not the default, _l_s-_F,
  1666.           behaves like ls -CF.
  1667.  
  1668.           _l_s-_F appends the following characters depending on the file
  1669.           type:
  1670.  
  1671.                 =           File is an AF_UNIX domain socket.
  1672.                             [if system supports sockets]
  1673.                 |           File is a named pipe (fifo)
  1674.                             [if system supports named pipes]
  1675.                 %           File is a character device
  1676.                 #           File is a block device
  1677.                 /           File is a directory
  1678.                 *           File is executable
  1679.                 +           File is a hidden directory [aix]
  1680.                             or context dependent [hpux]
  1681.                 :           File is network special [hpux]
  1682.  
  1683.           On systems that support symbolic links the variable
  1684.           _l_i_s_t_l_i_n_k_s controls the way symbolic links are identified. If
  1685.           _l_i_s_t_l_i_n_k_s is not set then the character '@' is appended to
  1686.           the file. If _l_i_s_t_l_i_n_k_s is set then the following characters
  1687.           are appended to the filename depending on the type of file
  1688.           the symbolic links points to:
  1689.  
  1690.                 @           File is a symbolic link pointing
  1691.                             to a non-directory
  1692.                 >           File is a symbolic link pointing
  1693.                             to a directory
  1694.                 &           File is a symbolic link pointing
  1695.                             to nowhere
  1696.  
  1697.           While setting _l_i_s_t_l_i_n_k_s can be helpful while navigating
  1698.           around the file system, it slows down _l_s-_F and it causes
  1699.           mounting of file systems if the symbolic links point to an
  1700.           NFS auto-mounted partition.
  1701.  
  1702.      11118888.... GGGGLLLLOOOOBBBBBBBBIIIINNNNGGGG SSSSYYYYNNNNTTTTAAAAXXXX AAAADDDDDDDDIIIITTTTIIIIOOOONNNNSSSS
  1703.           The syntax for any character in a range (for example ".[a-
  1704.           z]*") has been extended so as to conform with standard Unix
  1705.           regular expression syntax (see _e_d(1)).  Specifically, after
  1706.           an open bracket ("["), if the first character is a caret
  1707.           ("^") then the character matched will be any not in the
  1708.           range specified.  For example:
  1709.  
  1710.  
  1711.  
  1712.  
  1713.      Page 26                                          (printed 3/9/94)
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1721.  
  1722.  
  1723.  
  1724.                 > cd ~
  1725.                 > echo .[a-z]*
  1726.                 .cshrc .emacs .login .logout .menuwmrc
  1727.                 > echo .[^.]*
  1728.                 .Xdefaults .Xinit .cshrc .emacs .login .logout .menuwmrc
  1729.                 >
  1730.  
  1731.           Note that the second form includes .Xdefaults and .Xinit
  1732.           because 'X' (and all the lower case letters) are outside of
  1733.           the range of a single '.'.
  1734.  
  1735.           Also the ability to negate a globbing pattern has been
  1736.           added:
  1737.  
  1738.                 > echo *
  1739.                 foo foobar bar barfoo
  1740.                 > echo ^foo*
  1741.                 bar barfoo
  1742.  
  1743.           Note that this does not work correctly if the expression
  1744.           does not have any wildcard characters (?*[]) or if the
  1745.           expression has braces {}.
  1746.  
  1747.      11119999.... NNNNEEEEWWWW EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT AAAANNNNDDDD SSSSHHHHEEEELLLLLLLL VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  1748.           On startup, _t_c_s_h now automatically initializes the
  1749.           environment variable _H_O_S_T to the name of the machine that it
  1750.           is running on.  It does this by doing a _g_e_t_h_o_s_t_n_a_m_e(2)
  1751.           system call, and setting _H_O_S_T to the result.
  1752.  
  1753.           _T_c_s_h also initializes the environment variable _H_O_S_T_T_Y_P_E to a
  1754.           symbolic name for the type of computer that it is running
  1755.           on.  This is useful when sharing a single physical directory
  1756.           between several types of machines (running NFS, for
  1757.           instance).  For example, if the following is in ._l_o_g_i_n:
  1758.  
  1759.              set path = (~/bin.$HOSTTYPE /usr/ucb /bin /usr/bin
  1760.              /usr/games .)
  1761.  
  1762.           and the user has directories named "bin._m_a_c_h_i_n_e" (where
  1763.           _m_a_c_h_i_n_e is a name from the list below), then the user can
  1764.           have the same programs compiled for different machines in
  1765.           the appropriate "bin._m_a_c_h_i_n_e" directories and _t_c_s_h will run
  1766.           the binary for the correct machine.
  1767.  
  1768.           The current possible values are:
  1769.  
  1770.           _3_8_6_B_S_D         an Intel 386, running 386BSD
  1771.           _a_i_x_3_7_0         an IBM 370, running aix
  1772.           _a_i_x_E_S_A         an IBM ESA, running aix
  1773.           _a_l_l_i_a_n_t        an Alliant FX series
  1774.           _a_l_l_i_a_n_t-_f_x_8_0   an Alliant FX80 (mc68000 based)
  1775.           _a_l_l_i_a_n_t-_f_x_2_8_0_0 an Alliant FX2800 (i860 based)
  1776.  
  1777.  
  1778.  
  1779.      Page 27                                          (printed 3/9/94)
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1787.  
  1788.  
  1789.  
  1790.           _a_l_p_h_a          an DEC Alpha running OSF/1
  1791.           _a_m_d_a_h_l         an Amdahl running uts 2.1
  1792.           _a_m_i_g_a          an amiga running amix 2.02
  1793.           _a_p_o_l_l_o         an Apollo running DomainOS
  1794.           _a_t_t_3_b_1_5        an AT&T 3b15
  1795.           _a_t_t_3_b_2         an AT&T 3b2
  1796.           _a_t_t_3_b_2_0        an AT&T 3b20
  1797.           _a_t_t_3_b_5         an AT&T 3b5
  1798.           _b_a_l_a_n_c_e        a Sequent Balance (32000 based)
  1799.           _b_s_d_3_8_6         an Intel 386, running BSDI's bsd386
  1800.           _b_u_t_t_e_r_f_l_y      a BBN Computer Butterfly 1000
  1801.           _c_o_h_3_8_6         a 386 running Coherent 4.0
  1802.           _c_o_h_e_r_e_n_t       an unknown machine running Coherent
  1803.           _c_o_n_v_e_x         a Convex
  1804.           _c_r_a_y           a Cray running Unicos
  1805.           _d_e_c_s_t_a_t_i_o_n     a DecStation XXXX
  1806.           _e_t_a_1_0          an ETA 10 running SVR3
  1807.           _g_o_u_l_d-_n_p_1      a Gould NP1
  1808.           _h_k_6_8           a Heurikon HK68 running Uniplus+ 5.0
  1809.           _h_p_3_0_0          an HP 9000, series 300, running mtXinu
  1810.           _h_p_8_0_0          an HP 9000, series 800, running mtXinu
  1811.           _h_p_9_0_0_0_s_3_0_0     an HP 9000, series 300, running hpux
  1812.           _h_p_9_0_0_0_s_5_0_0     an HP 9000, series 500, running hpux
  1813.           _h_p_9_0_0_0_s_7_0_0     an HP 9000, series 700, running hpux
  1814.           _h_p_9_0_0_0_s_8_0_0     an HP 9000, series 800, running hpux
  1815.           _h_p             an HP, running hpux
  1816.           _i_3_8_6           an Intel 386, generic
  1817.           _i_3_8_6-_m_a_c_h      an Intel 386, running mach
  1818.           _i_3_8_6-_l_i_n_u_x     an Intel 386, running Linux
  1819.           _i_3_8_6-_e_m_x       an Intel 386, running emx [unix emulation under OS/2]
  1820.           _i_n_t_e_l_3_8_6       an Intel 386, running INTEL's SVR3
  1821.           _i_r_i_s_3_d         a Silicon Graphics Iris 3000
  1822.           _i_r_i_s_4_d         a Silicon Graphics Iris 4D
  1823.           _i_s_c_3_8_6         an Intel 386, running ISC
  1824.           _l_y_n_x_o_s-_i_3_8_6    _A_n _I_n_t_e_l _3_8_6 _r_u_n_n_i_n_g _L_y_n_x/_O_S-_2._1
  1825.           _l_y_n_x_o_s-_i_8_6_0    _A_n _I_n_t_e_l _8_6_0 _r_u_n_n_i_n_g _L_y_n_x/_O_S-_2._1
  1826.           _l_y_n_x_o_s-_m_6_8_k    _A _M_o_t_o_r_o_l_a _6_8_K  _r_u_n_n_i_n_g _L_y_n_x/_O_S-_2._1
  1827.           _l_y_n_x_o_s-_m_8_8_k    _A _M_o_t_o_r_o_l_a _8_8_K _r_u_n_n_i_n_g _L_y_n_x/_O_S-_2._1
  1828.           _l_y_n_x_o_s-_s_p_a_r_c   _A _s_p_a_r_c _r_u_n_n_i_n_g _L_y_n_x/_O_S-_2._1
  1829.           _l_y_n_x_o_s-_m_i_p_s    _A _m_i_p_s _r_u_n_n_i_n_g _L_y_n_x/_O_S-_2._1
  1830.           _l_y_n_x_o_s-_u_n_k_n_o_w_n _S_o_m_e_t_h_i_n_g _r_u_n_n_i_n_g _L_y_n_x/_O_S-_2._1
  1831.           _m_8_8_k           an mc88000 CPU machine
  1832.           _m_a_c_2           an Apple Computer Macintosh II, running AUX
  1833.           _m_a_s_s_c_o_m_p       a Concurrent (Masscomp), running RTU
  1834.           _m_i_n_i_x_3_8_6       an i386 running minix
  1835.           _m_i_n_i_x          a mac or an amiga running minix
  1836.           _m_i_p_s           another mips CPU
  1837.           _m_u_l_t_i_m_a_x       an Encore Computer Corp. Multimax (32000 based)
  1838.           _n_e_w_s           a Sony NEWS 800 or 1700 workstation
  1839.           _n_e_w_s__m_i_p_s      a NeWS machine with mips CPU
  1840.           _n_d_5_0_0          a Norsk Data ND 500/5000 running Ndix
  1841.           _n_s_3_2_0_0_0        an NS32000 CPU machine
  1842.  
  1843.  
  1844.  
  1845.      Page 28                                          (printed 3/9/94)
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1853.  
  1854.  
  1855.  
  1856.           _n_e_x_t           a NeXT computer
  1857.           _p_a_r_a_g_o_n        an intel paragon running osf1
  1858.           _p_f_a_5_0          a PFU/Fujitsu A-xx computer
  1859.           _p_s_2            an IBM PS/2, running aix
  1860.           _p_t_x            a Sequent Symmetry running DYNIX/ptx (386/486 based)
  1861.           _p_y_r_a_m_i_d        a Pyramid Technology computer (of any flavor)
  1862.           _r_s_6_0_0_0         an IBM RS6000, running aix
  1863.           _r_t             an IBM PC/RT, running BSD (AOS 4.3) or mach
  1864.           _r_t_p_c           an IBM PC/RT, running aix
  1865.           _s_c_o_3_8_6         an Intel 386, running SCO
  1866.           _s_t_e_l_l_a_r        a stellar running stellix
  1867.           _s_u_n            a Sun workstation of none of the above types
  1868.           _s_u_n_2           a Sun Microsystems series 2 workstation (68010 based)
  1869.           _s_u_n_3           a Sun Microsystems series 3 workstation (68020 based)
  1870.           _s_u_n_3_8_6_i        a Sun Microsystems 386i workstation (386 based)
  1871.           _s_u_n_4           a Sun Microsystems series 4 workstation (SPARC based)
  1872.           _s_y_m_m_e_t_r_y       a Sequent Symmetry running DYNIX 3 (386/486 based)
  1873.           _s_y_s_V_8_8         a Motorola MPC running System V/88 R32V2 (SVR3/88100 based)
  1874.           _t_a_h_o_e          a tahoe running 4BSD
  1875.           _t_e_k_4_3_0_0        a Tektronix 4300 running UTek (BSD 4.2 / 68020 based)
  1876.           _t_e_k_X_D_8_8        a Tektronix XD88/10 running UTekV 3.2e (SVR3/88100 based)
  1877.           _t_i_t_a_n          an Stardent Titan
  1878.           _u_n_i_x_p_c         an UNIX/PC running SVR1 att7300 aka att3b1
  1879.           _v_a_x            a Digital Equipment Corp. Vax (of any flavor)
  1880.           _v_i_s_t_r_a_8_0_0      a Stardent Vistra 800 running SVR4
  1881.           _V_M_S-_P_O_S_I_X      a vax? running VMS/POSIX
  1882.  
  1883.           (The names of the machines are usually trade marks of the
  1884.           corresponding companies.)
  1885.  
  1886.           _T_c_s_h also initializes the shell variables _u_i_d and _g_i_d to the
  1887.           value of the current real user ID/GID.  This is useful for
  1888.           telling what user/group the shell is running as. Under
  1889.           Domain/OS _t_c_s_h will also set _o_i_d indicating the current real
  1890.           organization id.
  1891.  
  1892.      22220000.... CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS FFFFOOOORRRR DDDDEEEEBBBBUUUUGGGGGGGGIIIINNNNGGGG
  1893.           Only two such commands are available at this point, both
  1894.           concerned with testing termcap entries.
  1895.           _t_e_l_l_t_c tells you, politely, what _t_c_s_h thinks of your
  1896.           terminal, and _s_e_t_t_c `cap' `value' tells _t_c_s_h to believe that
  1897.           the termcap capability `cap' ( as defined in _t_e_r_m_c_a_p(5) )
  1898.           has the value `value'. No checking for sanity is performed,
  1899.           so beware of improper use.
  1900.  
  1901.           Note that Concept terminal users may have to "settc xn no"
  1902.           to get proper wrapping at the rightmost column.
  1903.  
  1904.      22221111.... SSSSEEEEAAAARRRRCCCCHHHHIIIINNNNGGGG FFFFOOOORRRR TTTTHHHHEEEE VVVVIIIISSSSUUUUAAAALLLL HHHHIIIISSSSTTTTOOOORRRRYYYY
  1905.           Four new editor functions have been added in emacs mode: Two
  1906.           of them, history-search-backward, bound to M-p (and M-P),
  1907.           and history-search-forward, bound to M-n (and M-N),
  1908.  
  1909.  
  1910.  
  1911.      Page 29                                          (printed 3/9/94)
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1919.  
  1920.  
  1921.  
  1922.           implement a conventional search mechanism, while the other
  1923.           two, i-search-back and i-search-fwd, both unbound by
  1924.           default, implement the emacs-style incremental search.
  1925.  
  1926.           History-search-backward (history-search-forward) searches
  1927.           backward (forward) through the history list for previous
  1928.           (next) occurrence of the beginning of the input buffer as a
  1929.           command.  That is, if the user types:
  1930.  
  1931.                 > echo foo
  1932.                 foo
  1933.                 > ls
  1934.                 filea     fileb
  1935.                 > echo bar
  1936.                 bar
  1937.                 >
  1938.  
  1939.           and then types "echo<ESC>p", the shell will place "echo bar"
  1940.           in the editing buffer.  If another _M-_p was entered, the
  1941.           editing buffer would change to "echo foo".  This capability
  1942.           is compatible with the plain visual history; if the user
  1943.           were to then enter ^_P the editing buffer would be changed to
  1944.           "ls". The pattern used to search through the history is
  1945.           defined by the characters from the beginning of the line up
  1946.           to the current cursor position and may contain a shell
  1947.           globbing pattern. Successive history searches use the same
  1948.           pattern.
  1949.  
  1950.           When the incremental search functions are used, a prompt -
  1951.           "bck:" or "fwd:", depending on the chosen direction -
  1952.           appears, and characters typed are appended to the search
  1953.           pattern.  The matching command line is placed in the editing
  1954.           buffer, with the cursor positioned at the point where the
  1955.           pattern was found (the incremental search will also do
  1956.           searching within a command line).  If the search fails, the
  1957.           terminal bell is rung, and the ':' in the prompt is changed
  1958.           to '?'.
  1959.  
  1960.           If these functions are bound to single characters, and one
  1961.           of those is typed again during the incremental search, the
  1962.           search continues in the corresponding direction, with the
  1963.           pattern unchanged; if the previous search failed, this will
  1964.           also cause it to "wrap around" the history list.  Finally,
  1965.           the following characters also have a special meaning during
  1966.           the search:
  1967.  
  1968.                 Delete      (or any character bound to _b_a_c_k_w_a_r_d-_d_e_l_e_t_e-_c_h_a_r)
  1969.                             Undo the effect of the last character typed,
  1970.                             deleting a character from the pattern if appropriate.
  1971.                 ^G          Abort the search, back to the last successful one
  1972.                             if previous search failed, otherwise entire search.
  1973.                 ^W          Append the rest of the current word to the pattern.
  1974.  
  1975.  
  1976.  
  1977.      Page 30                                          (printed 3/9/94)
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  1985.  
  1986.  
  1987.  
  1988.                 ESC         Terminate the search, leaving current line in buffer.
  1989.  
  1990.           Any other character, that isn't bound to _s_e_l_f-_i_n_s_e_r_t-
  1991.           _c_o_m_m_a_n_d, terminates the search, leaving the current command
  1992.           line in the editing buffer, after which _t_c_s_h interprets the
  1993.           character as if it was normal input - notably _R_e_t_u_r_n will
  1994.           cause the current command line to be executed.
  1995.  
  1996.           In vi mode "vi-search-fwd" (bound to '/') and "vi-search-
  1997.           back" (bound to '?') can be used to search the visual
  1998.           history. In command mode '/' or '?' followed by a shell
  1999.           pattern, searches the visual history for the pattern. The
  2000.           pattern can be terminated either with a _R_e_t_u_r_n, in which
  2001.           case the matched history event is placed in the command
  2002.           buffer or an _E_s_c_a_p_e, in which case the matched history event
  2003.           is executed. If no history event matches the shell pattern
  2004.           then the bell is rung.
  2005.  
  2006.      22222222.... BBBBUUUUIIIILLLLTTTTIIIINNNN WWWWHHHHIIIICCCCHHHH((((1111))))////WWWWHHHHEEEERRRREEEE CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  2007.           There is now a builtin version of the _w_h_i_c_h(1) command.  The
  2008.           builtin version is just like the original, except that it
  2009.           correctly reports aliases peculiar to this _t_c_s_h, and builtin
  2010.           commands.  The only other difference is that the builtin
  2011.           runs somewhere between 10 and 100 times faster.  There is
  2012.           also a key-function interface to this command: the _w_h_i_c_h-
  2013.           _c_o_m_m_a_n_d function (normally bound to M-?), can be used
  2014.           anywhere on the command line, and will in effect do a
  2015.           'which' on the command name.
  2016.  
  2017.           Similarly where will report all known instances of the
  2018.           command: aliases, builtins, as well as all references in the
  2019.           path.
  2020.  
  2021.      22223333.... RRRREEEESSSSTTTTAAAARRRRTTTTIIIINNNNGGGG AAAA SSSSTTTTOOOOPPPPPPPPEEEEDDDD EEEEDDDDIIIITTTTOOOORRRR
  2022.           There is another new editor function: run-fg-editor, which
  2023.           is bound to _M-^_Z.  When typed, it saves away the current
  2024.           input buffer, and looks for a stopped job with a name equal
  2025.           to the file name part (last element) of either the EDITOR or
  2026.           VISUAL environment variables (if not defined, the default
  2027.           names are "ed" and "vi" respectively).  If such a job is
  2028.           found, then it is restarted as if "fg %_n_a_m_e" had been typed.
  2029.           This is used to toggle back and forth between an editor and
  2030.           the shell easily.  Some people bind this function to ^_Z so
  2031.           they can do this even more easily.
  2032.  
  2033.      22224444.... SSSSTTTTAAAATTTTUUUUSSSS LLLLIIIINNNNEEEE SSSSUUUUPPPPPPPPOOOORRRRTTTT
  2034.           _T_c_s_h has a new builtin called _e_c_h_o_t_c that allows the user to
  2035.           access the terminal capabilities from the command line,
  2036.           similar to the system V _t_p_u_t(1).
  2037.  
  2038.                 > echotc home
  2039.  
  2040.  
  2041.  
  2042.  
  2043.      Page 31                                          (printed 3/9/94)
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2051.  
  2052.  
  2053.  
  2054.           Places the cursor at the home position and
  2055.  
  2056.                 > echotc cm 3 10
  2057.  
  2058.           places the cursor at column 3 row 10.  This command replaces
  2059.           the _e_l and _s_l variables that used contain the escape
  2060.           sequences to begin and end status line changes. The command:
  2061.  
  2062.                 > echo $sl this is a test $el
  2063.  
  2064.           is replaced by:
  2065.  
  2066.                 > echotc ts 0; echo "this is a test"; echotc fs
  2067.  
  2068.           In addition _e_c_h_o_t_c understands the arguments _b_a_u_d, _l_i_n_e_s,
  2069.           _c_o_l_s, _m_e_t_a, and _t_a_b_s And prints the baud rate, the number of
  2070.           lines and columns, and "yes" or "no" depending if the
  2071.           terminal has tabs or a meta key.  This can be useful in
  2072.           determining how terse the output of commands will be
  2073.           depending on the baud rate, or setting limits to commands
  2074.           like history to the highest number so that the terminal does
  2075.           not scroll:
  2076.  
  2077.                 > set history=`echotc lines`
  2078.                 > @ history--
  2079.  
  2080.           Note: Termcap strings may contain wildcard characters, and
  2081.           echoing them will not work correctly. The suggested method
  2082.           of setting shell variables to terminal capability strings is
  2083.           using double quotes, as in the following example that places
  2084.           the date in the status line:
  2085.  
  2086.                 > set tosl="`echotc ts 0`"
  2087.                 > set frsl="`echotc fs`"
  2088.                 > echo -n "$tosl";date; echo -n "$frsl"
  2089.  
  2090.           _E_c_h_o_t_c accepts two flags. The flag -_v enables verbose
  2091.           messages and the flag -_s ignores any errors and returns the
  2092.           empty string if the capability is not found.
  2093.  
  2094.  
  2095.      22225555.... EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN OOOOFFFF AAAA CCCCOOOOMMMMMMMMAAAANNNNDDDD AAAAFFFFTTTTEEEERRRR CCCCHHHHAAAANNNNGGGGIIIINNNNGGGG TTTTHHHHEEEE CCCCUUUURRRRRRRREEEENNNNTTTT WWWWOOOORRRRKKKKIIIINNNNGGGG
  2096.           DDDDIIIIRRRREEEECCCCTTTTOOOORRRRYYYY
  2097.           _T_c_s_h now supports a special alias, _c_w_d_c_m_d, which if set
  2098.           holds a command that will be executed after changing the
  2099.           value of $cwd.  For example, if the user is running on an X
  2100.           window system _x_t_e_r_m(_1), and a re-parenting window manager
  2101.           that supports title bars such as _t_w_m(_1) _a_n_d _h_a_s _d_o_n_e:
  2102.  
  2103.                 > alias cwdcmd  'echo -n "^[]2;${HOST}:$cwd ^G"'
  2104.  
  2105.           then the shell will change the title of the running _x_t_e_r_m(_1)
  2106.  
  2107.  
  2108.  
  2109.      Page 32                                          (printed 3/9/94)
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2117.  
  2118.  
  2119.  
  2120.           to be the name of the host, a colon, and the full current
  2121.           working directory. A more fancy way to do that is:
  2122.  
  2123.                 > alias cwdcmd 'echo -n
  2124.                 "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G"'
  2125.  
  2126.           This will put the hostname and working directory on the
  2127.           title bar but only the hostname in the icon manager menu.
  2128.           Note that if a user defines _c_w_d_c_m_d to contain a _c_d, _p_u_s_h_d,
  2129.           or _p_o_p_d, command, an infinite loop may result.  In this
  2130.           case, it is the author's opinion that said user will get
  2131.           what he deserves.
  2132.  
  2133.      22226666.... NNNNAAAATTTTIIIIVVVVEEEE LLLLAAAANNNNGGGGUUUUAAAAGGGGEEEE SSSSYYYYSSSSTTTTEEEEMMMM
  2134.           _T_c_s_h is eight bit clean (if so compiled, see the description
  2135.           of the _v_e_r_s_i_o_n shell variable below), and will thus support
  2136.           character sets needing this capability.  The _t_c_s_h support
  2137.           for NLS differs depending on whether it was compiled to use
  2138.           the system's NLS (again, see the _v_e_r_s_i_o_n variable) or not.
  2139.           In either case, the default for character classification
  2140.           (i.e. which characters are printable etc) and sorting is 7-
  2141.           bit ascii, and any setting or unsetting of the LANG or
  2142.           LC_CTYPE environment variables will cause a check for
  2143.           possible changes in these respects.
  2144.  
  2145.           When using the system's NLS, the _s_e_t_l_o_c_a_l_e C library
  2146.           function will be called to determine appropriate character
  2147.           classification and sorting - this function will typically
  2148.           examine the LANG and LC_CTYPE variables for this purpose
  2149.           (refer to the system documentation for further details).
  2150.           Otherwise, NLS will be simulated, by assuming that the ISO
  2151.           8859-1 character set is used whenever either of the LANG and
  2152.           LC_CTYPE variables are set, regardless of their values.
  2153.           Sorting is not affected for the simulated NLS.
  2154.  
  2155.           In addition, with both real and simulated NLS, all printable
  2156.           characters in the range \200-\377, i.e. those that have M-
  2157.           <char> bindings, are automatically rebound to _s_e_l_f-_i_n_s_e_r_t-
  2158.           _c_o_m_m_a_n_d (the corresponding binding for the escape+<char>
  2159.           sequence, if any, is left alone).  This automatic rebinding
  2160.           is inhibited if the NOREBIND environment variable is set -
  2161.           this may be useful for the simulated NLS, or a primitive
  2162.           real NLS which assumes full ISO 8859-1 (otherwise all M-
  2163.           <char> bindings in the range \240-\377 will effectively be
  2164.           undone in these cases).  Explicitly rebinding the relevant
  2165.           keys, using _b_i_n_d_k_e_y, is of course still possible.
  2166.  
  2167.           Unknown characters (i.e. those that are neither printable
  2168.           nor control characters) will be printed using the \nnn
  2169.           format.  If the tty is not in 8 bit mode, other 8 bit
  2170.           characters will be printed by converting them to ascii and
  2171.           using standout mode.  _T_c_s_h will never change the 7/8 bit
  2172.  
  2173.  
  2174.  
  2175.      Page 33                                          (printed 3/9/94)
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2183.  
  2184.  
  2185.  
  2186.           mode of the tty, and will track user-initiated settings for
  2187.           this - i.e. it may be necessary for NLS users (or, for that
  2188.           matter, those that want to use a Meta key) to explicitly set
  2189.           the tty in 8 bit mode through the appropriate _s_t_t_y(1)
  2190.           command in e.g. the .login file.
  2191.  
  2192.      22227777.... AAAAUUUUTTTTOOOOMMMMAAAATTTTIIIICCCC PPPPRRRROOOOCCCCEEEESSSSSSSS TTTTIIIIMMMMEEEE RRRREEEEPPPPOOOORRRRTTTTIIIINNNNGGGG
  2193.           Automatic process time reporting is a feature that exists in
  2194.           _c_s_h, but it is usually not documented. In addition _t_c_s_h
  2195.           provides a slightly enriched syntax. Process time reports
  2196.           are controlled via the _t_i_m_e shell variable.  The first word
  2197.           of the _t_i_m_e variable indicates the minimum number of CPU
  2198.           seconds the process has to consume before a time report is
  2199.           produced. The optional second word controls the format of
  2200.           the report.  The following sequences are available for the
  2201.           format specification:
  2202.  
  2203.                 %U          The time the process spent in user mode
  2204.                             in cpu seconds.
  2205.                 %S          The time the process spent in kernel mode
  2206.                             in cpu seconds.
  2207.                 %E          The elapsed time in seconds.
  2208.                 %P          The CPU percentage computed as (%U + %S) / %E.
  2209.  
  2210.           The following sequences are supported only in systems that
  2211.           have the BSD resource limit functions.
  2212.  
  2213.                 %W          Number of times the process was swapped.
  2214.                 %X          The average amount in (shared) text space used
  2215.                             in Kbytes.
  2216.                 %D          The average amount in (unshared) data/stack
  2217.                             space used in Kbytes.
  2218.                 %K          The total space used (%X + %D) in Kbytes.
  2219.                 %M          The maximum memory the process had in use at
  2220.                             any time in Kbytes.
  2221.                 %F          The number of major page faults (page needed to
  2222.                             be brought from disk).
  2223.                 %R          The number of minor page faults.
  2224.                 %I          The number of input operations.
  2225.                 %O          The number of output operations.
  2226.                 %r          The number of socket messages received.
  2227.                 %s          The number of socket messages sent.
  2228.                 %k          The number of signals received.
  2229.                 %w          Number of voluntary context switches (waits).
  2230.                 %c          Number of involuntary context switches.
  2231.  
  2232.           The default time format is "%Uu %Ss %E %P %X+%Dk %I+%Oio
  2233.           %Fpf+%Ww" for systems that support resource usage reporting
  2234.           and "%Uu %Ss %E %P" for systems that do not.
  2235.  
  2236.           For Sequent's DYNIX/ptx %X, %D, %K, %r and %s are not
  2237.           supported.  However, the following additional sequences are
  2238.  
  2239.  
  2240.  
  2241.      Page 34                                          (printed 3/9/94)
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2249.  
  2250.  
  2251.  
  2252.           available.
  2253.  
  2254.                 %Y          The number of system calls performed.
  2255.                 %Z          The number of pages which are zero-filled
  2256.                             on demand.
  2257.                 %i          The number of times a process' resident
  2258.                             set size was increased by the kernel.
  2259.                 %d          The number of times a process' resident
  2260.                             set size was decreased by the kernel.
  2261.                 %l          The number of read system calls performed.
  2262.                 %m          The number of write system calls performed.
  2263.                 %p          the number of reads from raw disk devices.
  2264.                 %q          the number of writes to raw disk devices.
  2265.  
  2266.           The default time format for Sequent's DYNIX/ptx is "%Uu %Ss
  2267.           $E %P %I+%Oio %Fpf+%Ww". Also note that the CPU percentage
  2268.           can be higher than 100% on multi-processors.
  2269.  
  2270.      22228888.... OOOOSSSS////DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNTTTT BBBBUUUUIIIILLLLTTTTIIIINNNN SSSSUUUUPPPPPPPPOOOORRRRTTTT
  2271.           _T_R_A_N_S_P_A_R_E_N_T _C_O_M_P_U_T_I_N_G _F_A_C_I_L_I_T_Y
  2272.  
  2273.           On systems that support TCF (aix-ibm370, aix-ps2) the
  2274.           following builtins have been added:
  2275.  
  2276.           ggggeeeettttssssppppaaaatttthhhh  Print the current system execution path.
  2277.  
  2278.           sssseeeettttssssppppaaaatttthhhh LLLLOOOOCCCCAAAALLLL||||<<<<ssssiiiitttteeee>>>>||||<<<<ccccppppuuuu>>>> ............
  2279.                     Set the current execution path.
  2280.  
  2281.  
  2282.           ggggeeeettttxxxxvvvveeeerrrrssss  Print the current experimental version prefix.
  2283.  
  2284.  
  2285.           sssseeeettttxxxxvvvveeeerrrrssss [[[[<<<<ssssttttrrrriiiinnnngggg>>>>]]]]
  2286.                     If the optional string is ommited, any
  2287.                     experimental version prefix is removed.  Otherwise
  2288.                     the experimental version prefix is set to string.
  2289.  
  2290.  
  2291.           mmmmiiiiggggrrrraaaatttteeee [[[[----<<<<ssssiiiitttteeee>>>>]]]] <<<<ppppiiiidddd>>>>||||%%%%<<<<jjjjoooobbbbiiiidddd>>>> ............
  2292.           mmmmiiiiggggrrrraaaatttteeee ----<<<<ssssiiiitttteeee>>>>
  2293.                     The first form migrates the process or job to the
  2294.                     site specified or the default site determined by
  2295.                     the system path.  The second form, is equivalent
  2296.                     to 'migrate -<site> $$', i.e. migrates the current
  2297.                     process to the site specified. Note: migrating
  2298.                     _t_c_s_h itself can cause unexpected behavior, since
  2299.                     the shell does not like to lose its tty.
  2300.  
  2301.  
  2302.           In addition, jobs will print the site the job is executing.
  2303.  
  2304.  
  2305.  
  2306.  
  2307.      Page 35                                          (printed 3/9/94)
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2315.  
  2316.  
  2317.  
  2318.           _D_o_m_a_i_n/_O_S _S_u_p_p_o_r_t
  2319.  
  2320.           iiiinnnnlllliiiibbbb <<<<sssshhhhaaaarrrreeeedddd----lllliiiibbbbrrrraaaarrrryyyy>>>> ............
  2321.                Inlib adds shared libraries to the current environment.
  2322.                There is no way to remove them...
  2323.  
  2324.           rrrroooooooottttnnnnooooddddeeee ////////<<<<nnnnooooddddeeeennnnaaaammmmeeee>>>>
  2325.                Change the name of the current rootnode. From now on, /
  2326.                will resolve to //<_r_o_o_t_n_o_d_e>
  2327.  
  2328.           vvvveeeerrrr [[[[<<<<ssssyyyyssssttttyyyyppppeeee>>>>]]]] [[[[<<<<ccccoooommmmmmmmaaaannnndddd>>>>]]]]
  2329.                Without arguments, print $_S_Y_S_T_Y_P_E; with the <_s_y_s_t_y_p_e>
  2330.                provided, set _S_Y_S_T_Y_P_E to the one provided. Valid
  2331.                systypes are bsd4.3 and sys5.3. If a <_c_o_m_m_a_n_d> is
  2332.                argument is given, then <_c_o_m_m_a_n_d> is executed under the
  2333.                <_s_y_s_t_y_p_e> specified.
  2334.  
  2335.           _M_a_c_h
  2336.  
  2337.           sssseeeettttppppaaaatttthhhh <<<<ppppaaaatttthhhh----ssssppppeeeecccc>>>> ............
  2338.                XXX: What does it do?
  2339.  
  2340.           _M_a_s_s_c_o_m_p/_R_T_U
  2341.  
  2342.           uuuunnnniiiivvvveeeerrrrsssseeee <<<<uuuunnnniiiivvvveeeerrrrsssseeee----ssssppppeeeecccc>>>> ............
  2343.                Sets the current universe to the specified parameter.
  2344.  
  2345.           _C_o_n_v_e_x/_O_S
  2346.  
  2347.           wwwwaaaarrrrpppp [[[[<<<<uuuunnnniiiivvvveeeerrrrsssseeee----ssssppppeeeecccc>>>>]]]] ............
  2348.                Without arguments prints the current value of the
  2349.                universe. With a universe argument it sets the current
  2350.                universe to the value of the argument.
  2351.  
  2352.  
  2353.      22229999.... WWWWIIIINNNNDDDDOOOOWWWW SSSSIIIIZZZZEEEE TTTTRRRRAAAACCCCKKKKIIIINNNNGGGG
  2354.           On systems that support SIGWINCH or SIGWINDOW, _t_c_s_h adapts
  2355.           to window resizing automatically and adjusts the environment
  2356.           variables LINES and COLUMNS if set. Also if the environment
  2357.           variable TERMCAP contains li#, and co# fields, these will be
  2358.           adjusted also to reflect the new window size.
  2359.  
  2360.  
  2361.      33330000.... IIIINNNNPPPPUUUUTTTT FFFFIIIILLLLEEEESSSS
  2362.           On startup _t_c_s_h will try to source /_e_t_c/_c_s_h._c_s_h_r_c and then
  2363.           /_e_t_c/_c_s_h._l_o_g_i_n if the shell is a login shell. Then it will
  2364.           try to source $_H_O_M_E/._t_c_s_h_r_c and then $_H_O_M_E/._c_s_h_r_c if
  2365.           $_H_O_M_E/._t_c_s_h_r_c is not found. Then it will source $_H_O_M_E/._l_o_g_i_n
  2366.           if the shell is a login shell.  On exit _t_c_s_h will source
  2367.           first /_e_t_c/_c_s_h._l_o_g_o_u_t and then $_H_O_M_E/._l_o_g_o_u_t if the shell
  2368.           was a login shell.
  2369.  
  2370.  
  2371.  
  2372.  
  2373.      Page 36                                          (printed 3/9/94)
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2381.  
  2382.  
  2383.  
  2384.           Note: On _c_o_n_v_e_x_o_s, _s_t_e_l_l_i_x and _I_N_T_E_L the names of the system
  2385.           default files are /_e_t_c/_c_s_h_r_c , /_e_t_c/_l_o_g_i_n and /_e_t_c/_l_o_g_o_u_t
  2386.           respectively. On the NeXT the names are also different:
  2387.           /_e_t_c/_c_s_h_r_c._s_t_d , /_e_t_c/_l_o_g_i_n._s_t_d and /_e_t_c/_l_o_g_o_u_t._s_t_d Finally
  2388.           on _i_r_i_x, _A/_U_X, _A_M_I_X, and the _c_r_a_y only the file /_e_t_c/_c_s_h_r_c
  2389.           is executed if the shell is a login shell.
  2390.  
  2391.  
  2392.      33331111.... CCCCOOOOMMMMMMMMAAAANNNNDDDD LLLLIIIINNNNEEEE OOOOPPPPTTTTIIIIOOOONNNNSSSS
  2393.           This section describes options that are either undocumented
  2394.           in _c_s_h (*) or present only in _t_c_s_h. (+)
  2395.  
  2396.  
  2397.           -_d  Force load of directory stack. (+)
  2398.  
  2399.           -_D_n_a_m_e[=_v_a_l_u_e]
  2400.               Set environment variable name to value. (Domain/OS only)
  2401.               (+)
  2402.  
  2403.           -_F  Use fork() instead of vfork() to spawn processes.
  2404.               (Convex/OS only) (+)
  2405.  
  2406.           -_l  Make _t_c_s_h behave like a login shell.  (+)
  2407.  
  2408.           -_m  Allow reading of a .cshrc that does not belong to the
  2409.               effective user. Newer versions of _s_u(_1) can pass that to
  2410.               the shell. (some versions of csh have it) (+*)
  2411.  
  2412.           -_q  Make the shell accept SIGQUIT, and behave when it is
  2413.               used under a debugger.  Job control is disabled. (*)
  2414.  
  2415.  
  2416.      33332222.... HHHHIIIISSSSTTTTOOOORRRRYYYY AAAANNNNDDDD VVVVAAAARRRRIIIIAAAABBBBLLLLEEEE MMMMOOOODDDDIIIIFFFFIIIIEEEERRRR EEEENNNNHHHHAAAANNNNCCCCEEEEMMMMEEEENNNNTTTTSSSS
  2417.           _T_c_s_h accepts more than one variable modifier per variable or
  2418.           history expansion. For example, in _c_s_h(_1) the following
  2419.           command expands to:
  2420.  
  2421.                 % set a=/usr/local/foo.bar.baz
  2422.                 % echo $a:t:r:e
  2423.                 foo.bar.baz:r:e
  2424.  
  2425.           but in _t_c_s_h:
  2426.  
  2427.                 > set a=/usr/local/foo.bar.baz
  2428.                 > echo $a:t:r:e
  2429.                 bar
  2430.  
  2431.           This bug fix changes slightly the input syntax of _c_s_h,
  2432.           causing expressions of the form to have invalid syntax:
  2433.  
  2434.                 > set a=/usr/local/foo.bar.baz
  2435.                 > echo $a:t:$cwd
  2436.  
  2437.  
  2438.  
  2439.      Page 37                                          (printed 3/9/94)
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2447.  
  2448.  
  2449.  
  2450.                 Unknown variable modifier.
  2451.  
  2452.           Which is the correct behavior, since after the second colon
  2453.           a variable modifier is expected and `$' is found.
  2454.           Expressions like this should be re-written as:
  2455.  
  2456.                 > echo ${a:t}:$cwd
  2457.  
  2458.           _T_c_s_h can also use the _l and _u modifiers to change the case
  2459.           of a word.
  2460.  
  2461.           Also _t_c_s_h has an additional : character _a which applies the
  2462.           current modifier multiple times in the same word, in the
  2463.           same way _g applies the modifier once in each word:
  2464.  
  2465.                 > set foo=(a:b:c d:e:f)
  2466.                 > echo $foo:s/:/ /
  2467.                 a b:c d:e:f
  2468.                 > echo $foo:gs/:/ /
  2469.                 a b:c d e:f
  2470.                 > echo $foo:as/:/ /
  2471.                 a b c d:e:f
  2472.                 > echo $foo:ags/:/ /
  2473.                 a b c d e f
  2474.  
  2475.           The _c_s_h expert will notice in the above example another _t_c_s_h
  2476.           enhancement. In _c_s_h the _s modifier does not work for
  2477.           variables.
  2478.  
  2479.           The _a character works correctly with other modifiers, for
  2480.           example:
  2481.  
  2482.                 > echo $host
  2483.                 tesla.ee.cornell.edu
  2484.                 > echo $host:r
  2485.                 tesla.ee.cornell
  2486.                 > echo $host:ar
  2487.                 tesla
  2488.  
  2489.           _N_o_t_e: The _a character causes a modifier to be applied to a
  2490.           word repeatedly until the modifier fails. This can lead to
  2491.           an infinite loop in the current implementation when used
  2492.           with the _s modifier. For example :as/f/ff/ will never
  2493.           terminate. This behavior might change in the future.
  2494.  
  2495.  
  2496.      33333333.... PPPPRRRROOOOGGGGRRRRAAAAMMMMMMMMAAAABBBBLLLLEEEE CCCCOOOOMMMMPPPPLLLLEEEETTTTIIIIOOOONNNN
  2497.           The new _c_o_m_p_l_e_t_e and _u_n_c_o_m_p_l_e_t_e builtins can change the
  2498.           behavior of the listing and file-completion in tcsh. For
  2499.           example some commands like _c_d, _p_u_s_h_d, _p_o_p_d , _m_k_d_i_r(_1),
  2500.           _r_m_d_i_r(_1) accept only directories as arguments.  Normally
  2501.           _t_c_s_h when asked to list or complete an argument for those
  2502.  
  2503.  
  2504.  
  2505.      Page 38                                          (printed 3/9/94)
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2513.  
  2514.  
  2515.  
  2516.           commands takes into account all the files and not only
  2517.           directories. This behavior can be changed by telling _t_c_s_h
  2518.           that these commands only expect directory arguments:
  2519.  
  2520.           > complete cd 'n/*/d/'
  2521.  
  2522.           The above command tells _t_c_s_h to complete any following word
  2523.           with a directory.
  2524.  
  2525.           The syntax for the _c_o_m_p_l_e_t_e and _u_n_c_o_m_p_l_e_t_e builtins is:
  2526.  
  2527.           _c_o_m_p_l_e_t_e [<_c_o_m_m_a_n_d-_p_a_t_t_e_r_n> [<_c_o_m_p_l_e_t_i_o_n-_a_r_g_u_m_e_n_t>]]
  2528.           _u_n_c_o_m_p_l_e_t_e <_c_o_m_m_a_n_d-_p_a_t_t_e_r_n>
  2529.  
  2530.           Completion arguments are matched in turn from left to right
  2531.           and the first successful match is returned.  There are three
  2532.           different completion arguments, modeled after the _s_e_d(_1)
  2533.           substitute command and they are of the form:
  2534.  
  2535.           <<<<ccccoooommmmmmmmaaaannnndddd>>>>////<<<<mmmmaaaattttcccchhhh----ppppaaaatttttttteeeerrrrnnnn>>>>////<<<<ccccoooommmmpppplllleeeetttteeee----aaaaccccttttiiiioooonnnn>>>>////[[[[<<<<ssssuuuuffffffffiiiixxxx>>>>||||////]]]]
  2536.  
  2537.           The five commands available are:
  2538.  
  2539.           pppp    This specifies position-dependent completion. The
  2540.                matching pattern is a numeric range similar to the one
  2541.                used to index shell variables. If the current word is
  2542.                within that range, then the completion action is taken.
  2543.                For example:
  2544.  
  2545.                > complete cd 'p/1/d/'
  2546.  
  2547.                completes only the first argument of 'cd' with a
  2548.                directory. A special useful case of position-dependent
  2549.                completion can be used to disambiguate command
  2550.                completion:
  2551.  
  2552.                > set autolist
  2553.                > co[TAB]
  2554.                complete compress
  2555.                > complete -co* 'p/0/(complete)/'
  2556.                > co[TAB]
  2557.                > complete _
  2558.  
  2559.                The above command tells the completion mechanism to
  2560.                match any word on position 0, that matches the pattern
  2561.                _c_o* . If a match is found, the word is replaced with
  2562.                the literal pattern "complete". The leading '-' in the
  2563.                pattern signifies that this completion is to be used
  2564.                only with ambiguous commands.
  2565.  
  2566.           nnnn,,,,NNNN  This command specifies next-word completions. The
  2567.                matching pattern in this case is a shell pattern that
  2568.  
  2569.  
  2570.  
  2571.      Page 39                                          (printed 3/9/94)
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2579.  
  2580.  
  2581.  
  2582.                must match the previous word on the command line (_n),
  2583.                or the word before that (_N). For example:
  2584.  
  2585.                > complete find 'n/-user/u/'
  2586.  
  2587.                Here the argument of the find command which follows the
  2588.                -user argument is completed from the list of users.
  2589.  
  2590.           cccc,,,,CCCC  The last two completion commands complete the current
  2591.                word. The matching pattern in this case must match the
  2592.                prefix of the current word. For example:
  2593.  
  2594.                > complete cc 'c/-I/d/'
  2595.  
  2596.                completes the the word containing -I from the list of
  2597.                directories.  While ````cccc'''' discards the matched prefix,
  2598.                ````CCCC'''' keeps it and applies the completion using it.
  2599.  
  2600.  
  2601.           So far the _d, _u, (_w_o_r_d) completion actions have been
  2602.           mentioned. The complete list of completion actions are:
  2603.  
  2604.                 C           Complete completions
  2605.                 S           Complete signals
  2606.                 a           Complete aliases
  2607.                 b           Complete binding
  2608.                 c           Complete command
  2609.                 d           Complete directory
  2610.                 e           Complete environment variable
  2611.                 f           Complete file or path component
  2612.                 j           Complete jobs
  2613.                 l           Complete limits
  2614.                 n           Complete nothing
  2615.                 p           Complete files using the supplied pathname prefix
  2616.                 s           Complete shell variable
  2617.                 t           Complete non directory `text' filename
  2618.                 v           Complete any variable
  2619.                 u           Complete username
  2620.                 x           Explain what argument when listing is requested.
  2621.                 $var        Complete using words from variable
  2622.                 (...)       Complete using words from list
  2623.                 `...`       Complete evaluating word list from the output of command.
  2624.  
  2625.           All the above completion actions, except _x, $_v_a_r, (...), and
  2626.           `...` can have an additional shell pattern which must match
  2627.           the files to be completed, separated from the action with a
  2628.           ':'. The '_x' completion action instead expects the
  2629.           explanation string specified this way.  For example, in the
  2630.           C compiler, it makes sense to complete only files that the
  2631.           compiler understands:
  2632.  
  2633.           > complete cc 'n/*/f:*.[cao]/'
  2634.  
  2635.  
  2636.  
  2637.      Page 40                                          (printed 3/9/94)
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2645.  
  2646.  
  2647.  
  2648.           It is also useful to exclude files from the completion list.
  2649.           Normally _t_c_s_h will expand the following command:
  2650.  
  2651.           > set fignore=(.o)
  2652.           > ls
  2653.           foo.c foo.o
  2654.           > vi f[TAB]
  2655.           > vi foo.c
  2656.           > rm f[TAB]
  2657.           > rm foo.c
  2658.  
  2659.           A better way to do this is to use the _c_o_m_p_l_e_t_e builtin to
  2660.           protect precious files:
  2661.  
  2662.           > complete rm 'n/*/f:^*.{c,h,cc,C,tex,1,man,l,y}/'
  2663.           > ls
  2664.           foo.c foo.o
  2665.           > vi f[TAB]
  2666.           > vi foo.c
  2667.           > rm f[TAB]
  2668.           > rm foo.o
  2669.  
  2670.           Note that _f_i_g_n_o_r_e is not used when a shell pattern is
  2671.           specified in a completion action.
  2672.  
  2673.           Other commands don't expect files as arguments, so the
  2674.           completion builtin can be used to change the list of items
  2675.           to be completed:
  2676.  
  2677.             > complete man      'n/*/c/'            # complete commands
  2678.             > complete which    'n/*/c/'
  2679.             > complete dbx      'p/2/(core)/' 'n/*/c/'
  2680.             > complete alias    'p/1/a/'            # complete aliases
  2681.             > complete set      'p/1/s/'            # complete variables
  2682.             > complete finger   'p/1/u/'            # complete user-names
  2683.  
  2684.           Note that in the _d_b_x example, the positional completion is
  2685.           specified before the next word completion. Since completions
  2686.           are evaluated from left to right, if the next word
  2687.           completion was specified first it would always match and the
  2688.           positional completion would never be executed. This is a
  2689.           common mistake when defining a completion.
  2690.  
  2691.           In some cases the list needs to be customized or dynamically
  2692.           generated.
  2693.  
  2694.           > set hostnames=(prep.ai.mit.edu tesla.ee.cornell.edu)
  2695.           > complete rlogin 'p/1/$hostnames/'
  2696.  
  2697.           Consider a complex example using matching patterns to direct
  2698.           argument dependent completions:
  2699.           > complete find 'n/-fstype/(nfs 4.2)/' 'n/-name/f/' \
  2700.  
  2701.  
  2702.  
  2703.      Page 41                                          (printed 3/9/94)
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2711.  
  2712.  
  2713.  
  2714.                           'n/-type/(c b d f p l s)/' 'n/-user/u/' 'n/-exec/c/' \
  2715.                           'n/-ok/c/' 'n/-cpio/f/' 'n/-ncpio/f/' 'n/-newer/f/' \
  2716.                           'c/-/(fstype name perm prune type user nouser \
  2717.                                 group nogroup size inum atime mtime ctime exec \
  2718.                                 ok print ls cpio ncpio newer xdev depth)/' \
  2719.                           'n/*/d/'
  2720.  
  2721.  
  2722.           The words following the -_f_s_t_y_p_e and -_t_y_p_e arguments is to be
  2723.           completed from the lists specified.  The word following the
  2724.           -_n_a_m_e, -_c_p_i_o, -_n_c_p_i_o, and -_n_e_w_e_r arguments are to be
  2725.           completed using files or directory components.  The word
  2726.           following the -_u_s_e_r argument will be completed from the list
  2727.           of user names of the system, and the word following the -
  2728.           _e_x_e_c and -_o_k arguments will be completed from the list of
  2729.           commands.  The fourth line specifies how the current word
  2730.           will be completed if it starts with a -. Note that the
  2731.           pattern of this completion argument refers to the _c_u_r_r_e_n_t
  2732.           word and not to the _p_r_e_v_i_o_u_s word, like before.  Finally the
  2733.           last line in the find completion matches all the remaining
  2734.           cases and requires a directory component.
  2735.  
  2736.           > cd /usr
  2737.           > set autolist
  2738.           > find [TAB]
  2739.           bin/ include/ lib/ local/ man/ src/
  2740.           > find -[TAB]
  2741.           atime   depth   group   mtime   newer   ok      prune   user
  2742.           cpio    exec    inum    name    nogroup perm    size    xdev
  2743.           ctime   fstype  ls      ncpio   nouser  print   type
  2744.           > find -u[TAB]
  2745.           > find -user [TAB]
  2746.           christos root
  2747.           > find -user c[TAB]
  2748.           > find -user christos
  2749.  
  2750.           Another useful feature is to override the default suffix
  2751.           rules.  For example:
  2752.  
  2753.           > complete rcp 'c/*:/f/' 'p/1/$hosts/:'
  2754.           > complete finger 'c/*@/$hosts/' 'p/1/u/@'
  2755.  
  2756.           completes from $hosts appending a `:' and then begins
  2757.           expanding files, where finger expands user-names appending
  2758.           an `@' and then begins expanding hosts.
  2759.  
  2760.           Another exotic example that makes use of dynamic command
  2761.           execution is:
  2762.  
  2763.           > complete talk p/1/'`users | tr " " "\012" | uniq`'/ \
  2764.                      n/\*/\`who\ \|\ grep\ \$:1\ \|\ awk\ \'\{\ print\ \$2\ \}\'\`/
  2765.  
  2766.  
  2767.  
  2768.  
  2769.      Page 42                                          (printed 3/9/94)
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2777.  
  2778.  
  2779.  
  2780.           Here we want to get a list of the active users, as an
  2781.           argument to talk, then we want to pick the user, and find
  2782.           his tty...  Note that there is no quoting performed inside
  2783.           the completion patterns.  If the character '/' is used in
  2784.           the matched pattern, then another punctuation character can
  2785.           be used as a separator. The only pattern recognized is
  2786.           $$$$::::<<<<nnnnuuuummmmbbbbeeeerrrr>>>> which is substituted by the n'th word of the
  2787.           current line.
  2788.  
  2789.           Notes:
  2790.  
  2791.           1.   The completion command-patterns are overridden when the
  2792.                internal parsing mechanism determines that the
  2793.                completion is a login name, or a variable.
  2794.  
  2795.           2.   This is an experimental feature and the syntax/behavior
  2796.                may change in future versions.
  2797.  
  2798.  
  2799.      FFFFYYYYIIII
  2800.           This shell uses CBREAK mode but takes typed-ahead characters
  2801.           anyway.  You can still use _s_t_t_y(1) to set some of the modes
  2802.           of your terminal (but not bindings).
  2803.  
  2804.           This shell will restore your tty to a sane mode if it
  2805.           appears to return from some command in raw, CBREAK, or
  2806.           noecho mode. This behavior can be changed using _s_e_t_t_y.
  2807.  
  2808.      EEEENNNNHHHHAAAANNNNCCCCEEEEDDDD FFFFIIIILLLLEEEE IIIINNNNQQQQUUUUIIIIRRRRIIIIEEEESSSS
  2809.           _C_s_h allows the following file inquiries that can appear as
  2810.           primitive operands in expressions. They are for the form -_l
  2811.           <_f_i_l_e_n_a_m_e>.
  2812.  
  2813.                 r           read access
  2814.                 w           write access
  2815.                 x           execute access
  2816.                 e           existence
  2817.                 o           ownership
  2818.                 z           zero size
  2819.                 f           plain file
  2820.                 d           directory
  2821.                 l           symbolic link *
  2822.  
  2823.  
  2824.           _T_c_s_h defines also the following:
  2825.  
  2826.                 c           character special file
  2827.                 b           block special file
  2828.                 p           named pipe (fifo) *
  2829.                 u           set-user-ID bit is set
  2830.                 g           set-group-ID bit is set
  2831.                 k           sticky bit is set
  2832.  
  2833.  
  2834.  
  2835.      Page 43                                          (printed 3/9/94)
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2843.  
  2844.  
  2845.  
  2846.                 s           the file is non-zero size.
  2847.                 t           open file descriptor for terminal device [a number]
  2848.                 S           socket special file *
  2849.                 X           executable in the path or shell builtin
  2850.  
  2851.  
  2852.           Notes: On systems without the file types indicated by * the
  2853.           file inquiry operands return false.
  2854.  
  2855.           If tcsh is compiled for POSIX [i.e. POSIX is defined in
  2856.           config.h], then the result of test is based on the
  2857.           permission bits of the file and not on the result of the
  2858.           _a_c_c_e_s_s(_2) system call. I.e. if you mount a file system
  2859.           read-only, and test -w a file, then the test will succeed in
  2860.           POSIX mode, if the permissions of the file allow writing.
  2861.  
  2862.  
  2863.      RRRREEEEAAAADDDDOOOONNNNLLLLYYYY VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  2864.           _T_c_s_h allows defining variables as readonly. Such variables
  2865.           cannot be cleared or modified. E.g.
  2866.  
  2867.                 > set -r x=(1 2 3)
  2868.                 > unset x
  2869.                 unset: $x is read-only.
  2870.                 > set x=5
  2871.                 set: $x is read-only.
  2872.                 > set -r x=5
  2873.                 set: $x is read-only.
  2874.                 > echo $x
  2875.                 1 2 3
  2876.  
  2877.           In addition 'set -r' will list only the readonly variables.
  2878.  
  2879.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  2880.           HPATH -- path to look for command documentation
  2881.           LANG -- used to give preferred character environment (see
  2882.           NLS)
  2883.           LC_CTYPE -- used to change only ctype character handling
  2884.           (see NLS)
  2885.           NOREBIND -- inhibits rebinding of printable characters to
  2886.           self-insert-command
  2887.           PATH -- path to look for command execution
  2888.           SHLVL -- current shell level nesting
  2889.           TERM -- used to tell how to handle the terminal
  2890.           LINES -- Number of lines in terminal (see WINDOW SIZE)
  2891.           COLUMNS -- Number of columns in terminal (see WINDOW SIZE)
  2892.           TERMCAP -- Terminal capability string (see WINDOW SIZE)
  2893.           SYSTYPE -- The current system type (Domain OS only)
  2894.  
  2895.      NNNNEEEEWWWW SSSSHHHHEEEELLLLLLLL VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  2896.           aaaaddddddddssssuuuuffffffffiiiixxxx add a / for directories, and a space for normal
  2897.                     files when complete matches a name exactly.  If
  2898.  
  2899.  
  2900.  
  2901.      Page 44                                          (printed 3/9/94)
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2909.  
  2910.  
  2911.  
  2912.                     unset don't add anything extra.
  2913.  
  2914.           aaaammmmppppmmmm      show all times in 12 hour, AM/PM format.
  2915.  
  2916.           aaaauuuuttttooooccccoooorrrrrrrreeeecccctttt
  2917.                     Correct mis-spelled path components automatically
  2918.                     before attempting completion.
  2919.  
  2920.           aaaauuuuttttooooeeeexxxxppppaaaannnndddd
  2921.                     invoke the expand-history function automatically
  2922.                     on completion.
  2923.  
  2924.           aaaauuuuttttoooolllliiiisssstttt  list possibilities on an ambiguous completion.
  2925.  
  2926.           aaaauuuuttttoooollllooooggggoooouuuutttt
  2927.                     The first word indicates number of minutes of
  2928.                     inactivity before automatic logout.  The optional
  2929.                     second word indicates the number of minutes of
  2930.                     inactivity after which the user will be prompted
  2931.                     for his login password to enter a command.
  2932.  
  2933.           bbbbaaaacccckkkkssssllllaaaasssshhhh____qqqquuuuooootttteeee
  2934.                     makes the backslash quote \, ', and ". This option
  2935.                     changes the parsing mechanism for tcsh, and it can
  2936.                     cause syntax errors in _c_s_h scripts.
  2937.  
  2938.           ccccoooorrrrrrrreeeecccctttt   automatically try to correct the spelling of
  2939.                     commands.  Must be set to either correct=cmd, only
  2940.                     command name will be corrected, or correct=all,
  2941.                     the whole line will be corrected.
  2942.  
  2943.           ddddeeeexxxxttttrrrraaaacccctttt  extract a directory on pushd rather than rotating.
  2944.  
  2945.           ddddiiiirrrrssssffffiiiilllleeee  If set, it contains the full path-name where a
  2946.                     directory stack file is read/written.  It defaults
  2947.                     to $home/.cshdirs. This file is executed last
  2948.                     after .cshrc and .login to restore the directory
  2949.                     stack.
  2950.  
  2951.           ddddiiiirrrrssssttttaaaacccckkkk  If set, it contains an array of all the
  2952.                     directories on the directory stack. $dirstack[1]
  2953.                     is the current working directory, $dirstack[2] the
  2954.                     first directory on the stack etc. Setting
  2955.                     $dirstack resets all the stack entries, but the
  2956.                     current working directory which is preserved.
  2957.  
  2958.           dddduuuunnnniiiiqqqquuuueeee   Push only directories that are not already in the
  2959.                     directory stack.
  2960.  
  2961.           eeeecccchhhhoooo____ssssttttyyyylllleeee
  2962.                     Set the style of the builtin echo. Valid values
  2963.                     are:
  2964.  
  2965.  
  2966.  
  2967.      Page 45                                          (printed 3/9/94)
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  2975.  
  2976.  
  2977.  
  2978.                  _b_s_d :   if the first argument is -n, don't echo a
  2979.                          newline.
  2980.  
  2981.                  _s_y_s_v :  recognize \ escape sequences in echo strings.
  2982.  
  2983.                  _b_o_t_h :  recognize both -n and \ escape sequences.
  2984.  
  2985.                  _n_o_n_e :  the purist's echo.
  2986.  
  2987.           eeeeddddiiiitttt      use the input editor, set by default.
  2988.  
  2989.           ffffiiiiggggnnnnoooorrrreeee   list of file name suffixes (e.g. .o, ~) to ignore
  2990.                     during complete.
  2991.  
  2992.           ggggiiiidddd       the current real group id.
  2993.  
  2994.           hhhhiiiissssttttlllliiiitttt   If set, history lines in the editor will be shown
  2995.                     with its literal value (that is the line as it was
  2996.                     input) instead of the shells lexical version. The
  2997.                     current history line can be toggled between
  2998.                     literal and lexical with the toggle-literal-
  2999.                     history function.  History lines saved at shell
  3000.                     exit are also saved as this variable indicates.
  3001.  
  3002.           hhhhiiiissssttttffffiiiilllleeee  If set, it contains the full path-name where a
  3003.                     history file is read/written.  It defaults to
  3004.                     $home/.history. This is useful when sharing the
  3005.                     same home directory in different machines, or if
  3006.                     one wants to save all the histories in the tty
  3007.                     sessions. It is usually set in .cshrc for
  3008.                     interactive shells, because history is sourced
  3009.                     between .cshrc and .login so that it is available
  3010.                     from .login.
  3011.  
  3012.           hhhhiiiissssttttoooorrrryyyy   The first word of the history variable indicates
  3013.                     the number of history events to be saved. The
  3014.                     optional second word indicates the format history
  3015.                     is printed (Defaults to "%h\t%T\t%R\n").
  3016.  
  3017.           iiiinnnnppppuuuuttttmmmmooooddddeeee Can be set to either _i_n_s_e_r_t or _o_v_e_r_w_r_i_t_e to
  3018.                     control the line editing behavior, as described in
  3019.                     section 1.
  3020.  
  3021.           lllliiiissssttttjjjjoooobbbbssss  list all jobs when suspending. set listjobs=long,
  3022.                     produces long format.
  3023.  
  3024.           lllliiiissssttttlllliiiinnnnkkkkssss Resolve symbolic links when listing files so that
  3025.                     the correct filetype is shown.
  3026.  
  3027.           lllliiiissssttttmmmmaaaaxxxx   maximum number of items to list without asking
  3028.                     first.
  3029.  
  3030.  
  3031.  
  3032.  
  3033.      Page 46                                          (printed 3/9/94)
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  3041.  
  3042.  
  3043.  
  3044.           lllliiiissssttttmmmmaaaaxxxxrrrroooowwwwssss
  3045.                     maximum number of rows of items to list without
  3046.                     asking first.  (local AFEB hack at University of
  3047.                     Twente)
  3048.  
  3049.           mmmmaaaattttcccchhhhbbbbeeeeeeeepppp control beeping on completion.  With
  3050.                     matchbeep=nomatch, completion only beeps when
  3051.                     there is no match, with matchbeep=ambiguous, beeps
  3052.                     also when there are multiple matches, with
  3053.                     matchbeep=notunique, beeps when there is one exact
  3054.                     and other longer matches, with matchbeep=never, it
  3055.                     never beeps.
  3056.  
  3057.           nnnnoooobbbbeeeeeeeepppp    Disables beeping completely.
  3058.  
  3059.           nnnnooookkkkaaaannnnjjjjiiii   If kanji support is enable, setting this variable
  3060.                     disables it, so that the meta key can be used.
  3061.  
  3062.           nnnnoooossssttttaaaatttt    An list of directories that should not be stat'ed
  3063.                     during a completion operation. Some directories
  3064.                     e.g. "/afs", can take too much time to complete a
  3065.                     _s_t_a_t(_2) operation, making them prime candidates
  3066.                     for membership in this list.
  3067.  
  3068.           ooooiiiidddd       The organization id number (Domain OS only).
  3069.  
  3070.           pppprrrriiiinnnntttteeeexxxxiiiittttvvvvaaaalllluuuueeee
  3071.                     if an interactive program exits non-zero, print
  3072.                     the exit value.
  3073.  
  3074.           pppprrrroooommmmpppptttt    the string to prompt with.
  3075.  
  3076.           pppprrrroooommmmpppptttt2222   the string to prompt for while and for loops with.
  3077.  
  3078.           pppprrrroooommmmpppptttt3333   the string to prompt with when automatic spelling
  3079.                     correction has corrected a command line.
  3080.  
  3081.           ppppuuuusssshhhhddddttttoooohhhhoooommmmeeee
  3082.                     make pushd with no args do a "pushd ~" (like cd
  3083.                     does).
  3084.  
  3085.           ppppuuuusssshhhhddddssssiiiilllleeeennnntttt
  3086.                     do not print the dir stack on every pushd and
  3087.                     popd.
  3088.  
  3089.           rrrreeeecccceeeexxxxaaaacccctttt  recognize exact matches even if they are
  3090.                     ambiguous.
  3091.  
  3092.           rrrreeeeccccooooggggnnnniiiizzzzeeee____oooonnnnllllyyyy____eeeexxxxeeeeccccuuuuttttaaaabbbblllleeeessss
  3093.                     list choices of commands only displays files in
  3094.                     the path that are executable (slow).
  3095.  
  3096.  
  3097.  
  3098.  
  3099.      Page 47                                          (printed 3/9/94)
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  3107.  
  3108.  
  3109.  
  3110.           rrrrmmmmssssttttaaaarrrr    Prompt the user before execution of `rm *'.
  3111.  
  3112.           ssssaaaavvvveeeeddddiiiirrrrssss  Before exiting, create a file called
  3113.                     $HOME/.cshdirs that contains the necessary
  3114.                     commands to restore the current directory stack.
  3115.                     _T_c_s_h will read this file during startup and
  3116.                     restore the directory stack.
  3117.  
  3118.           ssssaaaavvvveeeehhhhiiiisssstttt  number of history items to save between login
  3119.                     sessions.  If it is just set, the number of items
  3120.                     is taken from $history.
  3121.  
  3122.           sssshhhhllllvvvvllll     Integer value indicating the number of nested
  3123.                     shells. On login shells the level is reset to 1.
  3124.  
  3125.           sssshhhhoooowwwwddddoooottttssss  show hidden files in list and complete operations.
  3126.                     If it is set to -A, then "." and ".." are not
  3127.                     displayed, similarly to the BSD ls -A.
  3128.  
  3129.           ssssyyyymmmmlllliiiinnnnkkkkssss  can be set to: _c_h_a_s_e , in order to resolve the
  3130.                     full path names, _i_g_n_o_r_e , in order to use $cwd to
  3131.                     resolve relative directory references for
  3132.                     builtins.  _e_x_p_a_n_d , in order to use $cwd and
  3133.                     rewrite the arguments for commands.
  3134.  
  3135.           ttttccccsssshhhh      Contains the current version of the shell as
  3136.                     R.VV.PP. The _R indicates the major release number,
  3137.                     the _V_V the current version and the _P_P the
  3138.                     patchlevel.
  3139.  
  3140.           tttteeeerrrrmmmm      the terminal type; see above.
  3141.  
  3142.           ttttppppeeeerrrriiiioooodddd   periodic command wait period (in minutes).
  3143.  
  3144.           ttttttttyyyy       The name of the tty, or empty if not attached to
  3145.                     one.
  3146.  
  3147.           uuuuiiiidddd       the current real user ID.
  3148.  
  3149.           vvvveeeerrrrssssiiiioooonnnn   the version ID stamp for this _t_c_s_h. It contains,
  3150.                     the origin of this version of _t_c_s_h, the date this
  3151.                     version was released and a string containing a
  3152.                     comma separated list of the compile time options
  3153.                     enabled:
  3154.                     8b 7b  If tcsh was compiled to be eight bit clean
  3155.                            or not.  The default is 8b.
  3156.                     nls    Set if tcsh uses the system's NLS, should be
  3157.                            the default for systems that have NLS.
  3158.                     lf     Set if tcsh should execute .login before
  3159.                            .cshrc on login shells. Default is not set.
  3160.                     dl     Set if tcsh should put . last on the path
  3161.                            for security. Default is set.
  3162.  
  3163.  
  3164.  
  3165.      Page 48                                          (printed 3/9/94)
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  3173.  
  3174.  
  3175.  
  3176.                     vi     Set if tcsh's default editor is vi. Default
  3177.                            is unset (emacs)
  3178.                     dtr    Set if tcsh should drop dtr on login shells
  3179.                            when exiting.  Default is unset.
  3180.                     bye    Set if tcsh should accept bye in addition
  3181.                            to logout, and rename log to watchlog.
  3182.                            Default is unset.
  3183.                     al     Set if tcsh should determine if autologout
  3184.                            should be enabled. The default is set.
  3185.                     kan    Set if tcsh is compiled for Kanji.
  3186.                            (ignore the iso character set.) Default is unset.
  3187.                     sm     Set if tcsh was compiled to use the system's malloc.
  3188.                     hb     Set if tcsh is emulating #!<program> <args> in
  3189.                            shell script execution
  3190.  
  3191.           In addition to the above strings, administrators can enter
  3192.           local strings to indicate differences in the local version.
  3193.  
  3194.  
  3195.           vvvviiiissssiiiibbbblllleeeebbbbeeeellllllll
  3196.                     use the visible bell (screen flash) rather than
  3197.                     audible bell.
  3198.  
  3199.           wwwwaaaattttcccchhhh     list of events to watch.
  3200.  
  3201.           wwwwhhhhoooo       format string for the printouts generated when
  3202.                     _w_a_t_c_h is set.
  3203.  
  3204.           wwwwoooorrrrddddcccchhhhaaaarrrrssss list of non-alphanumeric characters considered
  3205.                     part of a word for the purpose of the forward-
  3206.                     word, backward-word etc functions -- defaults to
  3207.                     "*?_-.[]~=".
  3208.  
  3209.      NNNNEEEEWWWW SSSSPPPPEEEECCCCIIIIAAAALLLL AAAALLLLIIIIAAAASSSSEEEESSSS
  3210.           _c_w_d_c_m_d    the command is run after every change of working
  3211.                     directory.
  3212.  
  3213.           _p_e_r_i_o_d_i_c  the command to be run every _t_p_e_r_i_o_d minutes.
  3214.  
  3215.           _p_r_e_c_m_d    the command to be run prior to printing each
  3216.                     prompt.
  3217.  
  3218.           _b_e_e_p_c_m_d   the command to be run every time _t_c_s_h wants to
  3219.                     echo the terminal bell.
  3220.  
  3221.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  3222.           xterm(1), twm(1), csh(1), chsh(1), termcap(5), termio(7)
  3223.  
  3224.      BBBBUUUUGGGGSSSS
  3225.           The screen update for lines longer than the screen width is
  3226.           very poor if the terminal cannot move the cursor up (i.e.
  3227.           terminal type "dumb").
  3228.  
  3229.  
  3230.  
  3231.      Page 49                                          (printed 3/9/94)
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  3239.  
  3240.  
  3241.  
  3242.           I am certain that there are bugs.  Bugs (preferably with
  3243.           fixes) should be sent to Christos Zoulas
  3244.           (christos@ee.cornell.edu).
  3245.  
  3246.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  3247.           This man page documents tcsh 6.04.00 (Cornell) 93/07/03.
  3248.  
  3249.      AAAAUUUUTTTTHHHHOOOORRRRSSSS
  3250.           Ken Greer, HP Labs, 1981
  3251.           Wrote the command completion.
  3252.  
  3253.           Mike Ellis, Fairchild, 1983
  3254.           Added command name recognition/completion.
  3255.  
  3256.           Paul Placeway, Ohio State CIS dept., 1983
  3257.           Added the command line editor.
  3258.  
  3259.           Rayan Zachariassen, University of Toronto, 1984
  3260.           Added the builtin _w_h_i_c_h feature to the editor, and the code
  3261.           for _l_s-_F . Also numerous bug fixes, modifications, and
  3262.           performance enhancements.
  3263.  
  3264.           Chris Kingsley, Caltech
  3265.           Wrote the fast storage allocator routines (nmalloc.c).
  3266.  
  3267.           Karl Kleinpaste, CCI 1983-4
  3268.           Added special aliases, directory stack extraction stuff,
  3269.           login/logout watch, and scheduled events.  Also came up with
  3270.           the idea of the new prompt format.
  3271.  
  3272.           Paul Placeway, Ohio State CIS dept., 1987
  3273.           Re-wrote the editor, cleaned up other code, and added the
  3274.           prompt routines, added to the syntax for file name
  3275.           expressions, and sped up the shell some.
  3276.  
  3277.           Chris Grevstad, TRW, 1987
  3278.           Ported the 4.3 csh sources to tcsh.
  3279.  
  3280.           Christos S. Zoulas, Cornell U. EE dept., 1987-92
  3281.           ported tcsh to HPUX, and System V rel. 2 and 3 and wrote a
  3282.           SysV version of getwd.c. Added SHORT_STRINGS support. New
  3283.           version of sh.glob.c.
  3284.  
  3285.           James J Dempsey, BBN, 1988, and Paul Placeway, OSU, 1988
  3286.           Re-ported tcsh to A/UX.
  3287.  
  3288.  
  3289.      BBBBUUUUGGGGFFFFIIIIXXXXEEEESSSS AAAANNNNDDDD EEEENNNNHHHHAAAANNNNCCCCEEEEMMMMEEEENNNNTTTTSSSS
  3290.           Tim P. Starrin, National Aeronautics and Space
  3291.           Administration, Langley Research Center Operations, 1993
  3292.           Readonly variable additions.
  3293.  
  3294.  
  3295.  
  3296.  
  3297.      Page 50                                          (printed 3/9/94)
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  3305.  
  3306.  
  3307.  
  3308.           Jeff Fink, 1992
  3309.           Added complete-word-fwd, and complete-word-back editor
  3310.           functions
  3311.  
  3312.           Harry C. Pulley, 1992
  3313.           Coherent port
  3314.  
  3315.           Andy Phillips, Mullard Space Science Lab U.K., 1992
  3316.           VMS-POSIX port.
  3317.  
  3318.           Beto Appleton, IBM Corp., 1992
  3319.           Walking process group fixes, lots of misc csh bug fixes,
  3320.           POSIX file tests, POSIX SIGHUP.
  3321.  
  3322.           Scott Bolte, Cray Computer Corp., 1992
  3323.           CSOS port.
  3324.  
  3325.           Kaveh R. Ghazi, Rutgers University, 1992
  3326.           Fixes and Ports for Tek, m88k, Titan, Masscomp.
  3327.  
  3328.           Mark Linderman, Cornell University, 1992
  3329.           OS/2 Port, (he does not run OS/2 anymore so he cannot help
  3330.           you porting tcsh on it)
  3331.  
  3332.           Mika Liljeberg, liljeber@kruuna.Helsinki.FI, 1992
  3333.           Linux port.
  3334.  
  3335.           Scott Krotz, Motorola, 1991
  3336.           Minix port.
  3337.  
  3338.           David Dawes, Sydney U. Australia, Physics dept., 1991
  3339.           SVR4 job control fixes. (reverse pipeline startup code, and
  3340.           signal fixes).
  3341.  
  3342.           Jose Sousa, Interactive Systems Corp., 1991
  3343.           Extended vi fixes. Added delete command in vi.
  3344.  
  3345.           Marc Horowitz, MIT, 1991
  3346.           Ansification fixes, new exec hashing code, imake fixes,
  3347.           where builtin.
  3348.  
  3349.           Eric Schnoebelen, Convex, 1990
  3350.           Convex support, lots of csh bug fixes, save and restore of
  3351.           directory stack.
  3352.  
  3353.           Jaap Vermeulen, Sequent, 1990-91
  3354.           Vi mode fixes, expand-line, window change fixes, ported to
  3355.           symmetry machines.
  3356.  
  3357.           Ron Flax, Apple, 1990
  3358.           Ported again to A/UX 2.0
  3359.  
  3360.  
  3361.  
  3362.  
  3363.      Page 51                                          (printed 3/9/94)
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  3371.  
  3372.  
  3373.  
  3374.           Dan Oscarsson, LTH Sweden, 1990
  3375.           NLS support and simulated for non NLS sites.  Correction of
  3376.           file names also handles the case when the / is replaced by
  3377.           another character.  The editor does not switch into cbreak
  3378.           mode unless needed.  The shell will not use character
  3379.           attributes when output is not to a tty.
  3380.  
  3381.           Johan Widen, SICS Sweden, 1990
  3382.           Shell level variable, mach support, correct-line, 8-bit
  3383.           printing.
  3384.  
  3385.           Matt Day, Sanyo Icon, 1990
  3386.           Added POSIX termio support; Fixed limit stuff for SysV.
  3387.  
  3388.           Hans J. Albertsson (Sun Sweden)
  3389.           Added the ampm variable handling, DING!, and the settc and
  3390.           telltc builtins.
  3391.  
  3392.           Michael Bloom
  3393.           Fixed some of the interrupt handling.
  3394.  
  3395.           Michael Fine, Digital Equipment Corp
  3396.           added the extended key support.
  3397.  
  3398.           Daniel Long, NNSC, 1988
  3399.           Added the wordchars variable.
  3400.  
  3401.           George Hartzell, MCD Biology, University of Colorado-
  3402.           Boulder, 1988
  3403.           Fixed the always resetting to DEL bug.
  3404.  
  3405.           Patrick Wolfe, Kuck and Associates, Inc., 1988
  3406.           Cleaned up VI mode and wrote the new editor description (in
  3407.           section 1).
  3408.  
  3409.           Jak Kirman, 1988
  3410.           Fixed the SunOS 4 giant stack allocation bug.
  3411.  
  3412.           Bruce Robertson, Tektronix, 1989
  3413.           Fixed setting erase and kill (again).
  3414.  
  3415.           David C Lawrence, Rensselaer Polytechnic Institute, 1989
  3416.           Added "autolist" variable and code to list possibilities on
  3417.           ambiguous completion.
  3418.  
  3419.           Martin Boyer, Institut de recherche d'Hydro-Quebec, 1991.
  3420.           Modified "autolist" variable and code to give options on
  3421.           beeping behavior.  Modified the history search to search for
  3422.           the whole string from the beginning of the line to the
  3423.           cursor.
  3424.  
  3425.           Alec Wolman, DEC, 1989
  3426.  
  3427.  
  3428.  
  3429.      Page 52                                          (printed 3/9/94)
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.      TTTTCCCCSSSSHHHH((((1111))))           CCCCoooorrrrnnnneeeellllllll 6666....00004444....00000000 ((((3333 JJJJuuuullllyyyy 1111999999993333))))           TTTTCCCCSSSSHHHH((((1111))))
  3437.  
  3438.  
  3439.  
  3440.           Added code to allow newlines in the prompt.
  3441.  
  3442.           Matt Landau, BBN, 1989
  3443.           Fixed YP bugs on Suns, added .tcshrc stuff.
  3444.  
  3445.           Ray Moody, Purdue Physics, 1989
  3446.           Added the code to do magic spacebar history expansion.
  3447.  
  3448.           Mordechai ????, Intel, 1989
  3449.           Re-arranged the printprompt() routine to use a switch(*cp)
  3450.           (rather than a bunch of ifs), and added a few things to it.
  3451.  
  3452.           Josh Siegel, dspo.gov, 1989
  3453.           Fixed "fg-editor" and added the status line shell variables
  3454.           "sl" and "el".
  3455.  
  3456.           Karl Berry, UMB, 1989
  3457.           Fixed a bug involving environ (in sh.func.c) on NeXT
  3458.           computers.
  3459.  
  3460.           Michael Greim, Universitaet des Saarlandes, Saarbruecken,
  3461.           W-Germany,
  3462.           Fixed the nested backquote bug (yes, you can do it; think
  3463.           about aliases) in 4.2 csh.  This fix was posted to
  3464.           comp.bugs.4bsd.
  3465.  
  3466.           Kazuhiro Honda, Department of Computer Science, Keio
  3467.           University, 1989
  3468.           Added the code for automatic spelling correction, the
  3469.           prompt3 stuff (the autocorrect prompt), and HOSTTYPE symbols
  3470.           for the Sony NEWS.
  3471.  
  3472.           Paul Placeway, BBN, 1990
  3473.           Fixed character redrawing code insert bugs, and made
  3474.           redrawing code handle multiple character movement, insert,
  3475.           and delete (if it exists).  Fixed setting of SHELL.
  3476.  
  3477.           Per Hedeland, Ellemtel, Sweden, 1990
  3478.           Various bugfixes and improvements, e.g. in history
  3479.           expansion, autolist, added autoexpand, updated the manual.
  3480.  
  3481.      TTTTHHHHAAAANNNNKKKKSSSS TTTTOOOO
  3482.           A special thanks to: Bryan Dunlap, Clayton Elwell, Karl
  3483.           Kleinpaste, Bob Manson, Steve Romig, Diana Smetters, Bob
  3484.           Sutterfield, Mark Verber, Elizabeth Zwicky, and all the
  3485.           other people at Ohio State for suggestions and
  3486.           encouragement.
  3487.  
  3488.           Also, thanks to all the people on the net for putting up
  3489.           with, reporting bugs in, and suggesting new additions to the
  3490.           old tcsh editor.
  3491.  
  3492.  
  3493.  
  3494.  
  3495.      Page 53                                          (printed 3/9/94)
  3496.  
  3497.  
  3498.  
  3499.